84% block-new-admin

Code Review | Block New Admin

WordPress plugin Block New Admin scored 84% from 54 tests.

About plugin

  • Plugin page: block-new-admin
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 24, 2017
  • Latest release: Jun 26, 2017
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: Pigrecolab (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active / 835 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.70ms] Passed 4 tests

A check of server-side resources used by Block New Admin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.60 ▼3.23
Dashboard /wp-admin3.36 ▲0.0646.50 ▼2.51
Posts /wp-admin/edit.php3.48 ▲0.1242.92 ▼1.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0692.66 ▼3.65
Media Library /wp-admin/upload.php3.29 ▲0.0633.27 ▼0.09
Block new admin /wp-admin/options-general.php?page=bna-settings-admin3.2531.31

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Block New Admin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.334.45 ▲2.8046.73 ▲2.69
Dashboard /wp-admin2,213 ▲224.86 ▲0.01100.76 ▼5.4239.28 ▼7.19
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0135.00 ▲0.8233.87 ▲0.78
Add New Post /wp-admin/post-new.php1,545 ▲318.43 ▲0.23598.14 ▼1.5263.92 ▲5.20
Media Library /wp-admin/upload.php1,386 ▲44.18 ▼0.0796.81 ▼1.4341.00 ▼3.47
Block new admin /wp-admin/options-general.php?page=bna-settings-admin9192.2727.5129.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/block-new-admin/admin-parts/sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/block-new-admin/admin-parts/tab-footer.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: new, administrators, security, doorway blocker

block-new-admin/block-new-admin.php Passed 13 tests

Analyzing the main PHP file in "Block New Admin" version 1.1.0
41 characters long description:
Block the creation of a new administrator

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
No dangerous file extensions were detected454 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP584111267
PO File299201156
CSS16426
JavaScript1005

PHP code Passed 2 tests

A short review of 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.26
Average class complexity10.00
▷ Minimum class complexity5.00
▷ Maximum class complexity15.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions1
▷ Named functions1100.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 images were found in this plugin