84% closemarketing-custom-admin

Code Review | Closemarketing Custom Admin

WordPress plugin Closemarketing Custom Admin scored84%from 54 tests.

About plugin

  • Plugin page: closemarketing-cu...
  • Plugin version: 1.12.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Nov 28, 2023
  • Number of updates: 86
  • Update frequency: every 28.8 days
  • Top authors: closemarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.65MB] [CPU: ▼11.13ms] Passed 4 tests

Server-side resources used by Closemarketing Custom Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6643.24 ▲1.88
Dashboard /wp-admin4.00 ▲0.6646.04 ▼15.73
Posts /wp-admin/edit.php4.06 ▲0.7051.78 ▼8.83
Add New Post /wp-admin/post-new.php6.52 ▲0.6380.82 ▼21.82
Media Library /wp-admin/upload.php3.87 ▲0.6439.95 ▲4.74
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.0540.60

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Closemarketing Custom Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,580 ▼16714.19 ▼0.091.50 ▼0.1340.82 ▲2.72
Dashboard /wp-admin1,988 ▼1905.47 ▼0.1490.35 ▼29.8441.74 ▲0.37
Posts /wp-admin/edit.php2,044 ▼561.97 ▲0.0339.31 ▼10.4832.77 ▼18.99
Add New Post /wp-admin/post-new.php1,504 ▼2220.57 ▼2.67606.74 ▼26.4447.69 ▼9.31
Media Library /wp-admin/upload.php1,406 ▲124.25 ▲0.0794.75 ▼4.6638.69 ▼2.06
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,4742.0329.7232.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/closemarketing-custom-admin/includes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/closemarketing-custom-admin/includes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/closemarketing-custom-admin/closemarketing-custom-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/closemarketing-custom-admin/includes/genesis.php:14

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: custom-admin

closemarketing-custom-admin/closemarketing-custom-admin.php 92% from 13 tests

Analyzing the main PHP file in "Closemarketing Custom Admin" version 1.12.0
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,650 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP76301,9442,464
PO File16061185
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity41.33
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods134
▷ Static methods53.73%
▷ Public methods10779.85%
▷ Protected methods2317.16%
▷ Private methods42.99%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/admin-cortina-fondo.png45.19KB28.17KB▼ 37.67%