84% edd-admin-notices

Code Review | EDD Admin Notices

WordPress plugin EDD Admin Notices scored84%from 54 tests.

About plugin

  • Plugin page: edd-admin-notices
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Sep 7, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: msolution (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /640 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.03MB] [CPU: ▼8.64ms] Passed 4 tests

Server-side resources used by EDD Admin Notices
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.84 ▲10.40
Dashboard /wp-admin3.21 ▼0.1431.42 ▼26.76
Posts /wp-admin/edit.php3.37 ▲0.0144.59 ▼0.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.67 ▼9.92
Media Library /wp-admin/upload.php3.24 ▲0.0134.97 ▲2.46

Server storage [IO: ▲0.04MB] [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
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for EDD Admin Notices
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.40 ▲0.032.16 ▲0.6852.81 ▲12.77
Dashboard /wp-admin2,198 ▲245.57 ▲0.0191.56 ▲5.8139.73 ▼3.21
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0036.51 ▼0.2833.13 ▼5.33
Add New Post /wp-admin/post-new.php1,526 ▼523.63 ▲0.50675.39 ▼3.1057.76 ▲2.29
Media Library /wp-admin/upload.php1,394 ▼94.18 ▼0.02100.15 ▼4.0943.11 ▼4.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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 no errors were found, this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-admin-notices/edd-admin-notices.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "-"
  • Screenshots: Please add an image for screenshot #1 (Admin Notices;)
The official readme.txt is a good inspiration

edd-admin-notices/edd-admin-notices.php Passed 13 tests

The principal PHP file in "EDD Admin Notices" v. 1.0.0 is loaded by WordPress automatically on each request
121 characters long description:
Adds a Admin Notice in the admin section, after user logs in, with links to the purchase histroy, and the downloads page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19930

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions2
▷ Named functions2100.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 files were detected