78% wp-awesome

Code Review | HUEM: Huge Upload Enabler, mostly

WordPress plugin HUEM: Huge Upload Enabler, mostly scored78%from 54 tests.

About plugin

  • Plugin page: wp-awesome
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Oct 25, 2016
  • Latest release: Jan 4, 2017
  • Number of updates: 3
  • Update frequency: every 23.0 days
  • Top authors: frodeborli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.79ms] Passed 4 tests

A check of server-side resources used by HUEM: Huge Upload Enabler, mostly
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.32 ▼1.98
Dashboard /wp-admin3.42 ▲0.1248.03 ▼7.13
Posts /wp-admin/edit.php3.53 ▲0.1849.98 ▲0.39
Add New Post /wp-admin/post-new.php6.00 ▲0.1288.03 ▼13.86
Media Library /wp-admin/upload.php3.35 ▲0.1238.18 ▼0.17
HUEM /wp-admin/options-general.php?page=wp-awesome-options3.3234.37

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for HUEM: Huge Upload Enabler, mostly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.65 ▼0.707.98 ▲6.1838.16 ▼6.48
Dashboard /wp-admin2,199 ▲225.51 ▼0.0893.28 ▲0.0341.49 ▼1.24
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0734.52 ▼3.5536.62 ▲0.41
Add New Post /wp-admin/post-new.php1,540 ▲1418.21 ▼4.80650.08 ▼47.5867.72 ▲3.66
Media Library /wp-admin/upload.php1,401 ▲14.22 ▲0.1499.86 ▼15.1945.36 ▼4.07
HUEM /wp-admin/options-general.php?page=wp-awesome-options8732.1726.1828.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-awesome/wp-awesome.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'WPA\\Module\\Fluent\\Backends\\BackendInterface' not found in wp-content/plugins/wp-awesome/modules/Fluent/Backends/WP_Query.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'WPA\\Module\\Fluent\\Backend\\IteratorAggregate' not found in wp-content/plugins/wp-awesome/modules/Fluent/Backends/BackendInterface.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-awesome/pages/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: context menu, upload limit, upload size, user experience, user interface...

wp-awesome/wp-awesome.php 77% from 13 tests

The main PHP script in "HUEM: Huge Upload Enabler, mostly" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/Languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("Languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,022 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14170147805
JavaScript2276141
CSS10040
PO File19936

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods46
▷ Static methods2963.04%
▷ Public methods4597.83%
▷ Protected methods12.17%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected