84% ab-wp-security

Code Review | AB WP Security

WordPress plugin AB WP Security scored84%from 54 tests.

About plugin

  • Plugin page: ab-wp-security
  • Plugin version: 1.51
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Jun 18, 2017
  • Number of updates: 14
  • Update frequency: every 3.8 days
  • Top authors: abjelosevic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,673 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.23ms] Passed 4 tests

Server-side resources used by AB WP Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.94 ▲4.01
Dashboard /wp-admin3.34 ▲0.0452.08 ▼1.51
Posts /wp-admin/edit.php3.39 ▲0.0347.99 ▼5.48
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.35 ▼10.21
Media Library /wp-admin/upload.php3.26 ▲0.0342.55 ▲0.30
AB WP Security /wp-admin/options-general.php?page=abwps3.2333.64

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AB WP Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.141.70 ▲0.0842.30 ▼1.90
Dashboard /wp-admin2,199 ▲215.59 ▼0.0888.81 ▼21.4541.69 ▼8.75
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0138.08 ▼5.0937.72 ▼0.06
Add New Post /wp-admin/post-new.php1,529 ▲323.14 ▼0.44588.14 ▼96.6447.63 ▼13.23
Media Library /wp-admin/upload.php1,407 ▲104.17 ▼0.0797.33 ▼18.9943.66 ▼3.05
AB WP Security /wp-admin/options-general.php?page=abwps8451.9924.7330.84

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× 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/ab-wp-security/ab-wp-security-plugin.php:208

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: disable directory browsing, security, enumeration, disable xml-rpc, block...

ab-wp-security/ab-wp-security-plugin.php 85% from 13 tests

The primary PHP file in "AB WP Security" version 1.51 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ab-wp-security.php" instead of "ab-wp-security-plugin.php")
  • Description: The description should be shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected138 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15421138

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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