83% dependency-minification

Code Review | Dependency Minification

WordPress plugin Dependency Minification scored83%from 54 tests.

About plugin

  • Plugin page: dependency-minifi...
  • Plugin version: 0.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2013
  • Latest release: Feb 25, 2015
  • Number of updates: 16
  • Update frequency: every 35.6 days
  • Top authors: westonruter (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

40+ active /16,004 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.35ms] Passed 4 tests

Analyzing server-side resources used by Dependency Minification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.33 ▼2.74
Dashboard /wp-admin3.32 ▲0.0243.93 ▼3.02
Posts /wp-admin/edit.php3.38 ▲0.0243.65 ▼3.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.44 ▼4.58
Media Library /wp-admin/upload.php3.25 ▲0.0232.21 ▼1.17
Dep. Minification /wp-admin/tools.php?page=dependency-minification3.2130.73

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Dependency Minification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.37 ▼0.191.77 ▲0.3144.13 ▲5.28
Dashboard /wp-admin2,202 ▲255.62 ▲0.0290.91 ▲0.1737.63 ▼6.18
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0739.56 ▲5.1936.65 ▼1.40
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▼0.65657.32 ▼44.3249.70 ▲1.27
Media Library /wp-admin/upload.php1,407 ▲44.12 ▼0.10105.49 ▲4.0246.71 ▲2.14
Dep. Minification /wp-admin/tools.php?page=dependency-minification7942.0428.5831.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dependency-minification/dependency-minification.php:1032

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

dependency-minification/dependency-minification.php 85% from 13 tests

The principal PHP file in "Dependency Minification" v. 0.9.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 316 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,610 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP105458863,214
Bourne Again Shell24118172
Markdown4400111
Bourne Shell112647
YAML15028
XML13024
CSS12014

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity43.33
▷ Minimum class complexity1.00
▷ Maximum class complexity229.00
Average method complexity8.88
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods96
▷ Static methods3940.62%
▷ Public methods6163.54%
▷ Protected methods1717.71%
▷ Private methods1818.75%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants109
▷ Global constants9788.99%
▷ Class constants1211.01%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin