84% what-the-wp

Code Review | What The WP?

WordPress plugin What The WP? scored 84% from 54 tests.

About plugin

  • Plugin page: what-the-wp
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.9.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Feb 5, 2018
  • Number of updates: 6
  • Update frequency: every 161.3 days
  • Top authors: tsewlliw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 614 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.03MB] [CPU: ▼5.59ms] Passed 4 tests

An overview of server-side resources used by What The WP?
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.88 ▼11.24
Dashboard /wp-admin3.33 ▲0.0345.36 ▼1.82
Posts /wp-admin/edit.php3.38 ▲0.0347.43 ▼2.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.73 ▼7.28
Media Library /wp-admin/upload.php3.25 ▲0.0235.32 ▲2.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for What The WP?
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.101.85 ▼0.2740.38 ▼6.73
Dashboard /wp-admin2,209 ▲275.84 ▼0.0799.88 ▼25.2940.99 ▼7.80
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0040.33 ▼2.3334.10 ▼1.56
Add New Post /wp-admin/post-new.php1,533 ▼323.41 ▲0.18658.02 ▲12.5952.96 ▼8.89
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0396.80 ▼2.0942.12 ▼0.08

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/what-the-wp/classes/class-wtwp-audit.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === what-the-wp === )
The official readme.txt is a good inspiration

what-the-wp/what-the-wp.php Passed 13 tests

This is the main PHP file of "What The WP?" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Simple audit and traceablity for WordPress DevOps

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin202 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4409202

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity6.00
▷ Minimum class complexity5.00
▷ Maximum class complexity7.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods26100.00%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin