88% accidentals

Code Review | Accidentals

WordPress plugin Accidentals scored 88% from 54 tests.

About plugin

  • Plugin page: accidentals
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 5.9.2
  • First release: Nov 26, 2012
  • Latest release: Nov 26, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bpimentel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 835 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼296.10ms] Passed 4 tests

Analyzing server-side resources used by Accidentals
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▼0.0350.79 ▼0.84
Dashboard /wp-admin3.43 ▲0.0334.68 ▲0.02
Posts /wp-admin/edit.php3.67 ▲0.0339.06 ▲3.28
Add New Post /wp-admin/post-new.php6.91 ▼0.06100.36 ▼1,176.75
Media Library /wp-admin/upload.php3.32 ▲0.0226.68 ▼6.83
Accidentals /wp-admin/options-general.php?page=accidentals3.2622.70

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accidentals
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,963 ▲20918.42 ▲2.8628.73 ▲22.8543.57 ▲41.36
Dashboard /wp-admin2,897 ▲426.13 ▼0.03119.88 ▼18.03158.58 ▼3.70
Posts /wp-admin/edit.php2,693 ▲53.23 ▼0.0162.45 ▼1.89137.26 ▼9.93
Add New Post /wp-admin/post-new.php1,693 ▲2520.66 ▲1.35433.90 ▲35.62161.66 ▲6.24
Media Library /wp-admin/upload.php1,697 ▲25.43 ▼0.08156.87 ▲16.10184.03 ▲2.40
Accidentals /wp-admin/options-general.php?page=accidentals1,2772.3755.64148.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=accidentals
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=accidentals
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=accidentals
    • > Notice in wp-content/plugins/accidentals/accidentals.php+162
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 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/accidentals/accidentals.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === accidentals === )
You can take inspiration from this readme.txt

accidentals/accidentals.php 92% from 13 tests

"Accidentals" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 205 characters long)

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
Good job! No executable or dangerous file extensions detected268 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41625146
PHP11335122

PHP code Passed 2 tests

An short overview of 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.34
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin