84% blog-id-in-site-admin-menu

Code Review | Blog ID in Site Admin Menu

WordPress plugin Blog ID in Site Admin Menu scored 84% from 54 tests.

About plugin

  • Plugin page: blog-id-in-site-a...
  • Plugin version: 2...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2010
  • Latest release: Apr 5, 2015
  • Number of updates: 18
  • Update frequency: every 98.4 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 4,074 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.22ms] Passed 4 tests

Server-side resources used by Blog ID in Site Admin Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.51 ▲0.26
Dashboard /wp-admin3.31 ▲0.0046.74 ▼5.89
Posts /wp-admin/edit.php3.36 ▲0.0045.44 ▲2.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.08 ▼5.11
Media Library /wp-admin/upload.php3.23 ▲0.0032.29 ▼2.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Blog ID in Site Admin Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.14 ▼1.231.75 ▲0.1043.21 ▼2.08
Dashboard /wp-admin2,209 ▲244.87 ▼0.00111.24 ▲8.4142.46 ▼4.96
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0234.41 ▼1.9233.31 ▼8.21
Add New Post /wp-admin/post-new.php1,542 ▲918.35 ▼4.60649.45 ▼28.9659.50 ▲1.48
Media Library /wp-admin/upload.php1,385 ▼04.26 ▲0.0298.28 ▼1.4343.18 ▼5.35

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/blog-id-in-site-admin-menu/blog-id-in-site-admin-menu.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: multi-site, wpmu

blog-id-in-site-admin-menu/blog-id-in-site-admin-menu.php 92% from 13 tests

The main PHP script in "Blog ID in Site Admin Menu" version 2... is automatically included on every request by WordPress
You should first fix the following items:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "2...")

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 detected35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203835

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.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin