84% notices-api

Code Review | Notices API

WordPress plugin Notices API scored84%from 54 tests.

About plugin

  • Plugin page: notices-api
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Aug 9, 2014
  • Latest release: Aug 9, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: danielbitzer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /924 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Notices API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.13 ▲1.34
Dashboard /wp-admin3.32 ▲0.0244.91 ▼6.20
Posts /wp-admin/edit.php3.37 ▲0.0246.19 ▼2.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.24 ▼12.24
Media Library /wp-admin/upload.php3.24 ▲0.0233.94 ▲1.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Notices API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲15713.67 ▼0.706.24 ▲4.4439.49 ▼3.96
Dashboard /wp-admin2,209 ▲214.81 ▼1.09100.52 ▼0.4143.98 ▲2.02
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0139.89 ▲3.6836.45 ▲1.86
Add New Post /wp-admin/post-new.php1,532 ▼123.32 ▲0.08657.67 ▲26.2956.92 ▲7.80
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.1692.32 ▼6.4942.10 ▲0.33

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 plugin_dir_url() in wp-content/plugins/notices-api/notices-api.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === notices-api === )
The official readme.txt is a good inspiration

notices-api/notices-api.php Passed 13 tests

The entry point to "Notices API" version 1.0 is a PHP file that has certain tags in its header comment area
71 characters long description:
Adds some much needed functionality to display alerts on the front end.

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
Success! There were no dangerous files found in this plugin309 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17672124
PHP1417785
Markdown114045
Sass111132
CSS10023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods541.67%
▷ Public methods12100.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
There are no PNG files in this plugin