84% wp-performance-security

Code Review | Performance & Security

WordPress plugin Performance & Security scored84%from 54 tests.

About plugin

  • Plugin page: wp-performance-se...
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Jul 5, 2023
  • Number of updates: 46
  • Update frequency: every 69.1 days
  • Top authors: imaginarymedia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /4,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.58ms] Passed 4 tests

Analyzing server-side resources used by Performance & Security
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2142.46 ▲1.06
Dashboard /wp-admin3.52 ▲0.1751.54 ▼6.08
Posts /wp-admin/edit.php3.62 ▲0.2655.57 ▲8.72
Add New Post /wp-admin/post-new.php6.09 ▲0.2094.12 ▼5.13
Media Library /wp-admin/upload.php3.44 ▲0.2142.54 ▲3.83
Performance & Security /wp-admin/options-general.php?page=wpps_config3.4135.18

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
wpps_options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Performance & Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.111.87 ▲0.1241.95 ▼1.52
Dashboard /wp-admin2,210 ▲194.90 ▼0.99100.82 ▼5.5740.09 ▼0.92
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0540.79 ▲7.3834.43 ▲0.01
Add New Post /wp-admin/post-new.php1,537 ▲2318.14 ▲0.51631.54 ▼62.1078.56 ▲21.72
Media Library /wp-admin/upload.php1,389 ▲14.21 ▲0.0296.66 ▼7.4541.92 ▼2.02
Performance & Security /wp-admin/options-general.php?page=wpps_config1,9182.0924.0741.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • wpps_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-performance-security/modules/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-performance-security/modules/scripts.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-performance-security === )
Please take inspiration from this readme.txt

wp-performance-security/wp-performance-security.php 92% from 13 tests

The principal PHP file in "Performance & Security" v. 0.9.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 259 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,179 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32071181,138
JavaScript18141

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions4695.83%
▷ Anonymous functions24.17%
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
No PNG files were detected