10% aph-merge-scripts

Code Review | APH Merge Scripts

WordPress plugin APH Merge Scripts scored10%from 54 tests.

About plugin

  • Plugin page: aph-merge-scripts
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Jul 13, 2016
  • Latest release: Sep 4, 2016
  • Number of updates: 46
  • Update frequency: every 5.4 days
  • Top authors: agusph (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /5,328 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/aph-merge-scripts/includes/aphms-admin-bar.php+39
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.64ms] Passed 4 tests

Analyzing server-side resources used by APH Merge Scripts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5151.90 ▲11.43
Dashboard /wp-admin3.55 ▲0.2044.96 ▼14.39
Posts /wp-admin/edit.php3.66 ▲0.3053.03 ▲5.95
Add New Post /wp-admin/post-new.php6.15 ▲0.2697.43 ▲0.57
Media Library /wp-admin/upload.php3.47 ▲0.2436.80 ▲5.30
APH Merge Scripts /wp-admin/options-general.php?page=aph-merge-scripts3.41238.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
aphms_options
widget_recent-comments
aphms_notice
aphms_plugin_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for APH Merge Scripts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4413.57 ▼1.081.76 ▼0.0337.23 ▼7.30
Dashboard /wp-admin2,214 ▲294.84 ▼0.97108.81 ▼10.2346.79 ▲2.43
Posts /wp-admin/edit.php2,103 ▲142.02 ▲0.0240.50 ▼2.2834.93 ▼2.11
Add New Post /wp-admin/post-new.php1,528 ▲823.48 ▲0.11626.01 ▼67.6653.10 ▼5.88
Media Library /wp-admin/upload.php1,402 ▲234.27 ▲0.0896.00 ▼10.2542.85 ▼1.01
APH Merge Scripts /wp-admin/options-general.php?page=aph-merge-scripts1,1741.6829.3938.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aph-merge-scripts
    • > Deprecated in wp-content/plugins/aph-merge-scripts/includes/aphms-admin.php+625
    join(): Passing glue string after array is deprecated. Swap the parameters

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/aph-merge-scripts/includes/minifier/JShrink/Minifier.php on line 227
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aph-merge-scripts/includes/aphms-config.php on line 12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aph-merge-scripts/includes/aphms-config.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/aph-merge-scripts/includes/minifier/minify/src/CSS.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/aph-merge-scripts/includes/minifier/minify/src/Exceptions/IOException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/aph-merge-scripts/includes/minifier/minify/src/Exceptions/FileImportException.php:8
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/aph-merge-scripts/includes/aphms-config.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/aph-merge-scripts/includes/minifier/minify/src/JS.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/aph-merge-scripts/includes/minifier/minify/src/Exceptions/BasicException.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aph-merge-scripts/includes/aphms-admin.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: minify, queue, combine styles, merge scripts, merge styles...

aph-merge-scripts/aph-merge-scripts.php 92% from 13 tests

This is the main PHP file of "APH Merge Scripts" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 210 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .jar - Java Archive in Firefox, IE, Chrome, Safari
      • wp-content/plugins/aph-merge-scripts/includes/minifier/yuicompressor/yuicompressor.jar
2,557 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP196441,4352,205
CSS281207
JavaScript31514107
Markdown121038

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.64
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes14
▷ Abstract classes428.57%
▷ Concrete classes1071.43%
▷ Final classes00.00%
Methods116
▷ Static methods21.72%
▷ Public methods6354.31%
▷ Protected methods4437.93%
▷ Private methods97.76%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin