78% ep-admin-messages

Code Review | EP Admin Messages

WordPress plugin EP Admin Messages scored78%from 54 tests.

About plugin

  • Plugin page: ep-admin-messages
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Nov 5, 2013
  • Number of updates: 21
  • Update frequency: every 3.6 days
  • Top authors: eskapism (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,797 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.03MB] [CPU: ▼6.30ms] Passed 4 tests

This is a short check of server-side resources used by EP Admin Messages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.14 ▼3.57
Dashboard /wp-admin3.34 ▲0.0450.57 ▲0.38
Posts /wp-admin/edit.php3.39 ▲0.0452.63 ▲5.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.95 ▼18.89
Media Library /wp-admin/upload.php3.26 ▲0.0433.99 ▼3.12

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

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

Browser metrics Passed 4 tests

EP Admin Messages: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.34 ▲0.081.70 ▼0.0143.16 ▼0.64
Dashboard /wp-admin2,207 ▲305.55 ▼0.0188.36 ▼2.6442.45 ▲0.20
Posts /wp-admin/edit.php2,110 ▲101.95 ▼0.0239.41 ▼0.4441.81 ▲8.85
Add New Post /wp-admin/post-new.php1,540 ▲1222.98 ▼0.19629.23 ▼33.9358.24 ▲2.83
Media Library /wp-admin/upload.php1,409 ▲94.20 ▲0.02100.90 ▼7.0846.91 ▼0.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 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 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ep-admin-messages/ep-admin-messages.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ep-admin-messages/ep-admin-messages.class.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Three messages being shown on the edit post screen. Notice that you can add HTML to your messages and add headlines, links, images, and so on.), #2 (Four messages being shown on the dashboard.)
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt is a good inspiration

ep-admin-messages/ep-admin-messages.php Passed 13 tests

This is the main PHP file of "EP Admin Messages" version 0.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Show custom messages in the admin area

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected347 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP213164242
JSON10094
Markdown17011

PHP code Passed 2 tests

An overview 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.75
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
2 compressed PNG files occupy 0.10MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png36.63KB38.02KB0.00%
screenshot-1.png64.62KB67.07KB0.00%