84% plugin-dependencies

Code Review | Plugin Dependencies

WordPress plugin Plugin Dependencies scored84%from 54 tests.

About plugin

  • Plugin page: plugin-dependencies
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 24, 2010
  • Latest release: Nov 13, 2014
  • Number of updates: 31
  • Update frequency: every 48.7 days
  • Top authors: scribu (83.87%)westonruter (19.35%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /7,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Plugin Dependencies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.72 ▼3.11
Dashboard /wp-admin3.43 ▲0.1349.14 ▲1.98
Posts /wp-admin/edit.php3.54 ▲0.1949.47 ▲1.30
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.97 ▼19.06
Media Library /wp-admin/upload.php3.35 ▲0.1239.62 ▲8.09

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Dependencies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.141.70 ▼0.2137.21 ▼10.24
Dashboard /wp-admin2,203 ▲154.85 ▼1.03110.32 ▲8.0738.59 ▼8.66
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0140.19 ▼0.2534.77 ▼2.45
Add New Post /wp-admin/post-new.php1,537 ▲2318.65 ▲0.92630.93 ▲34.4063.25 ▲14.44
Media Library /wp-admin/upload.php1,391 ▲94.19 ▼0.0193.52 ▼5.4440.95 ▼0.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/plugin-dependencies/plugin-dependencies.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

plugin-dependencies/plugin-dependencies.php Passed 13 tests

"Plugin Dependencies" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
Prevent activating plugins that don't have all their dependencies satisfied

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected623 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151165523
PO File22535100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.00
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods30100.00%
▷ Public methods2273.33%
▷ Protected methods516.67%
▷ Private methods310.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin