84% plugins-condition

Code Review | Plugins Condition

WordPress plugin Plugins Condition scored84%from 54 tests.

About plugin

  • Plugin page: plugins-condition
  • Plugin version: 1.08
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 17, 2019
  • Latest release: Nov 1, 2023
  • Number of updates: 31
  • Update frequency: every 50.6 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /5,689 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.01MB] [CPU: ▼7.76ms] Passed 4 tests

Analyzing server-side resources used by Plugins Condition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.78 ▲0.66
Dashboard /wp-admin3.33 ▼0.0149.06 ▼12.88
Posts /wp-admin/edit.php3.38 ▲0.0245.66 ▼0.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.42 ▼15.09
Media Library /wp-admin/upload.php3.25 ▲0.0234.17 ▼2.33
Plugins Condition /wp-admin/options-general.php?page=PluginsCondition3.2232.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
plg_cond_notify_interval
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Plugins Condition
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.25 ▼0.101.55 ▼0.4444.47 ▲0.79
Dashboard /wp-admin2,199 ▲225.63 ▼0.0494.42 ▲4.8544.95 ▲1.81
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0240.09 ▼0.0136.15 ▼0.66
Add New Post /wp-admin/post-new.php1,529 ▲123.07 ▼0.04660.45 ▼58.0157.73 ▲7.43
Media Library /wp-admin/upload.php1,407 ▲104.17 ▼0.0694.70 ▼4.2239.33 ▼2.93
Plugins Condition /wp-admin/options-general.php?page=PluginsCondition8871.9521.8227.01

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 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • plg_cond_notify_interval
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugins-condition/lib/class-pluginsconditionadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plugins-condition/lib/class-pluginscondition.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugins-condition/lib/class-pluginsconditionadmin.php:37

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: state, condition, plugin

plugins-condition/pluginscondition.php 92% from 13 tests

The principal PHP file in "Plugins Condition" v. 1.08 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("plugins-condition.php" instead of "pluginscondition.php")

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
There were no executable files found in this plugin541 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4111227541

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.50
▷ Minimum class complexity24.00
▷ Maximum class complexity43.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin