89% gm-site-admin

Code Review | GM Site Admin

WordPress plugin GM Site Admin scored89%from 54 tests.

About plugin

  • Plugin page: gm-site-admin
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: Jan 11, 2016
  • Number of updates: 12
  • Update frequency: every 21.3 days
  • Top authors: ashlealanier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.26ms] Passed 4 tests

An overview of server-side resources used by GM Site Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.69 ▼8.09
Dashboard /wp-admin3.33 ▲0.0255.63 ▲0.64
Posts /wp-admin/edit.php3.38 ▲0.0252.93 ▼1.04
Add New Post /wp-admin/post-new.php5.91 ▲0.02101.77 ▼8.54
Media Library /wp-admin/upload.php3.25 ▲0.0239.80 ▲2.28

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

GM Site Admin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,781 ▼514.69 ▲0.501.80 ▼0.1043.95 ▲0.36
Dashboard /wp-admin2,184 ▲105.52 ▼0.13101.49 ▲11.6844.89 ▼0.14
Posts /wp-admin/edit.php2,092 ▼82.00 ▼0.0337.12 ▼1.9033.96 ▼4.69
Add New Post /wp-admin/post-new.php1,520 ▼1723.63 ▲5.34623.05 ▼55.6455.43 ▼19.19
Media Library /wp-admin/upload.php1,395 ▼24.26 ▲0.08105.47 ▲2.5445.87 ▼1.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Activation link. There are no other screenshots, because the plugin works silently behind the scenes.)
The official readme.txt might help

gm-site-admin/site-admin.php 92% from 13 tests

Analyzing the main PHP file in "GM Site Admin" version 1.0.3
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gm-site-admin.php" instead of "site-admin.php")

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
There were no executable files found in this plugin87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1183587

PHP code Passed 2 tests

This is a short overview 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.45
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.09KB5.55KB▼ 54.12%