89% wm-secure-and-optimize

Code Review | WM Secure and Optimize

WordPress plugin WM Secure and Optimize scored89%from 54 tests.

About plugin

  • Plugin page: wm-secure-and-opt...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2022
  • Latest release: May 10, 2023
  • Number of updates: 13
  • Update frequency: every 27.2 days
  • Top authors: selvaklnc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.02ms] Passed 4 tests

An overview of server-side resources used by WM Secure and Optimize
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.02 ▼4.37
Dashboard /wp-admin3.38 ▲0.0456.90 ▼11.18
Posts /wp-admin/edit.php3.49 ▲0.1450.41 ▼0.43
Add New Post /wp-admin/post-new.php5.98 ▲0.1098.15 ▼3.85
Media Library /wp-admin/upload.php3.30 ▲0.0835.80 ▼0.67

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WM Secure and Optimize
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.33 ▲0.111.76 ▲0.2343.92 ▲1.87
Dashboard /wp-admin2,215 ▲415.51 ▼0.0692.93 ▼0.6345.23 ▲5.55
Posts /wp-admin/edit.php2,117 ▲172.00 ▲0.0138.25 ▲2.9333.94 ▼4.71
Add New Post /wp-admin/post-new.php1,543 ▲1522.99 ▼0.14604.23 ▼68.4252.10 ▼11.20
Media Library /wp-admin/upload.php1,420 ▲234.19 ▲0.00100.21 ▼2.0839.85 ▼5.18

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 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
6 plugin tags: minify, speed, performance, security, protection...

wm-secure-and-optimize/wm-secure-optimize.php 77% from 13 tests

The main PHP script in "WM Secure and Optimize" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wm-secure-and-optimize.php" instead of "wm-secure-optimize.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,232 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10197501,135
CSS118881
JavaScript13016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods350.00%
▷ Protected methods350.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.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