84% wp-condition

Code Review | WordPress Site Condition

WordPress plugin WordPress Site Condition scored84%from 54 tests.

About plugin

  • Plugin page: wp-condition
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2014
  • Latest release: May 25, 2023
  • Number of updates: 20
  • Update frequency: every 163.0 days
  • Top authors: zinger252 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,066 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.05MB] [CPU: ▼5.07ms] Passed 4 tests

Server-side resources used by WordPress Site Condition
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.06 ▼1.30
Dashboard /wp-admin3.35 ▲0.0548.82 ▼3.58
Posts /wp-admin/edit.php3.40 ▲0.0546.56 ▼5.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0779.10 ▼10.25
Media Library /wp-admin/upload.php3.27 ▲0.0533.85 ▼0.98

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
wpfixit_con_load_times
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WordPress Site Condition: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10314.54 ▲0.164.48 ▲2.6944.52 ▼2.02
Dashboard /wp-admin2,229 ▲415.75 ▲0.8599.31 ▼15.3037.58 ▼10.31
Posts /wp-admin/edit.php2,112 ▲232.49 ▲0.3534.43 ▼0.9330.32 ▼8.99
Add New Post /wp-admin/post-new.php1,531 ▲1223.72 ▲0.53688.34 ▲11.6838.20 ▼42.79
Media Library /wp-admin/upload.php1,405 ▲144.85 ▲0.67103.94 ▲0.8841.55 ▼4.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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)
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
The following issues need your attention
  • 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/wp-condition/wp-condition.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: developer, counter, condition, social graph, query...

wp-condition/wp-condition.php Passed 13 tests

The main file in "WordPress Site Condition" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
137 characters long description:
Display WP-Condition in Chart for Database Performance, Memory Performance, Site Performance, and Social Performance. Requires PHP 5.2.0+

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
Success! There were no dangerous files found in this plugin11,785 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,3932,29111,474
PHP398101296
CSS11015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.00
▷ Minimum class complexity8.00
▷ Maximum class complexity16.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected