84% plugin-docs

Code Review | Plugin Docs

WordPress plugin Plugin Docs scored84%from 54 tests.

About plugin

  • Plugin page: plugin-docs
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2016
  • Latest release: Aug 11, 2022
  • Number of updates: 13
  • Update frequency: every 160.5 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.29ms] Passed 4 tests

A check of server-side resources used by Plugin Docs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.73 ▼1.43
Dashboard /wp-admin3.32 ▼0.0244.39 ▼16.28
Posts /wp-admin/edit.php3.37 ▲0.0245.52 ▼4.64
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.35 ▼22.79
Media Library /wp-admin/upload.php3.24 ▲0.0235.02 ▲3.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Docs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼0.971.90 ▲0.0742.97 ▼0.26
Dashboard /wp-admin2,210 ▲245.76 ▲0.85104.65 ▼3.3937.61 ▼6.09
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0035.76 ▼7.1332.84 ▼2.71
Add New Post /wp-admin/post-new.php1,521 ▼2123.19 ▲4.98666.36 ▲51.7053.88 ▲3.17
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0295.20 ▼4.0040.45 ▼6.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/plugin-docs/plugin-docs.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: shortcode, embed

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

The main file in "Plugin Docs" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
Add notes to your plugins so you can document why you needed each one

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected79 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13855
JavaScript10017
CSS1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected