83% wp-shield

Code Review | WP Shield

WordPress plugin WP Shield scored83%from 54 tests.

About plugin

  • Plugin page: wp-shield
  • Plugin version: 1.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Nov 24, 2019
  • Latest release: Jan 6, 2020
  • Number of updates: 16
  • Update frequency: every 3.9 days
  • Top authors: drupalmatts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,141 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.00MB] [CPU: ▼3.22ms] Passed 4 tests

An overview of server-side resources used by WP Shield
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.24 ▼3.43
Dashboard /wp-admin3.31 ▼0.0351.73 ▼4.88
Posts /wp-admin/edit.php3.36 ▲0.0147.87 ▲4.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.75 ▼4.11
Media Library /wp-admin/upload.php3.23 ▲0.0134.98 ▼0.44

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Shield
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲4113.37 ▼1.011.92 ▲0.0942.45 ▲0.41
Dashboard /wp-admin2,215 ▲304.83 ▼0.9897.13 ▼4.3140.34 ▲0.91
Posts /wp-admin/edit.php2,101 ▲122.05 ▼0.0736.05 ▲1.3333.50 ▼2.77
Add New Post /wp-admin/post-new.php1,544 ▲222.92 ▲4.64614.70 ▼12.1454.70 ▲0.51
Media Library /wp-admin/upload.php1,400 ▲124.17 ▼0.0592.33 ▼21.3041.83 ▼6.09

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
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-shield/wp_shield.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 your attention:
  • Donate link: Invalid url: "N/A"
You can take inspiration from this readme.txt

wp-shield/wp_shield.php 85% from 13 tests

"WP Shield" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-shield.php" instead of "wp_shield.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin144 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42722144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin