89% protect-wp-admin

Code Review | Protect WP Admin

WordPress plugin Protect WP Admin scored89%from 54 tests.

About plugin

  • Plugin page: protect-wp-admin
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Sep 27, 2023
  • Number of updates: 133
  • Update frequency: every 24.5 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

20,000+ active /491,851 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.22ms] Passed 4 tests

Analyzing server-side resources used by Protect WP Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.26 ▲5.40
Dashboard /wp-admin3.41 ▲0.1149.86 ▼1.01
Posts /wp-admin/edit.php3.53 ▲0.1756.02 ▲4.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1198.30 ▲0.30
Media Library /wp-admin/upload.php3.33 ▲0.1141.33 ▲6.28
Protect WP-Admin /wp-admin/options-general.php?page=pwa-settings3.3141.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Protect WP Admin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.25 ▼1.111.68 ▼0.1639.60 ▼6.34
Dashboard /wp-admin2,224 ▲335.87 ▼0.04105.58 ▲1.7346.67 ▲5.65
Posts /wp-admin/edit.php2,110 ▲242.01 ▼0.0138.13 ▼0.0535.50 ▲2.45
Add New Post /wp-admin/post-new.php1,553 ▲2418.65 ▲0.11610.26 ▼30.9756.47 ▼1.51
Media Library /wp-admin/upload.php1,406 ▲184.14 ▼0.0695.91 ▼7.5144.86 ▼0.38
Protect WP-Admin /wp-admin/options-general.php?page=pwa-settings1,68110.36329.9640.19

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 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 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots need descriptions #6, #7, #8 in protect-wp-admin/assets to your readme.txt
You can take inspiration from this readme.txt

protect-wp-admin/protect-wp-admin.php Passed 13 tests

The entry point to "Protect WP Admin" version 4.0 is a PHP file that has certain tags in its header comment area
87 characters long description:
Give extra protection to your site admin and make secure your website against hackers!!

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
Everything looks great! No dangerous files found in this plugin584 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP38392497
JavaScript214686
CSS1041

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions26
▷ Named functions26100.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
No PNG files were detected