89% word-security

Code Review | Plugin Name: Word Security

WordPress plugin Plugin Name: Word Security scored89%from 54 tests.

About plugin

  • Plugin page: word-security
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2018
  • Latest release: Mar 23, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: spcits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.87ms] Passed 4 tests

This is a short check of server-side resources used by Plugin Name: Word Security
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.33 ▼1.96
Dashboard /wp-admin3.35 ▲0.0556.59 ▲0.48
Posts /wp-admin/edit.php3.40 ▲0.0553.52 ▲2.43
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.09 ▼3.54
Media Library /wp-admin/upload.php3.27 ▲0.0533.97 ▼2.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Word Security
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.31 ▼0.241.83 ▲0.0644.55 ▼1.94
Dashboard /wp-admin2,214 ▲405.62 ▼0.1185.28 ▼11.9041.64 ▼3.81
Posts /wp-admin/edit.php2,116 ▲192.03 ▲0.0637.67 ▲1.7733.18 ▼1.45
Add New Post /wp-admin/post-new.php1,539 ▲1223.00 ▼0.31645.30 ▼76.1451.66 ▼7.87
Media Library /wp-admin/upload.php1,416 ▲194.28 ▲0.10100.29 ▲0.4445.61 ▲1.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

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 errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Word Security === )
The official readme.txt might help

word-security/wordsecurity.php 85% from 13 tests

The main PHP file in "Plugin Name: Word Security" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("word-security.php" instead of "wordsecurity.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected273 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP75313273

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin