78% wp-margin-notes

Code Review | WP Margin Notes

WordPress plugin WP Margin Notes scored78%from 54 tests.

About plugin

  • Plugin page: wp-margin-notes
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: Oct 3, 2016
  • Number of updates: 8
  • Update frequency: every 25.5 days
  • Top authors: Mista-Flo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,097 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.01ms] Passed 4 tests

A check of server-side resources used by WP Margin Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.73 ▼8.75
Dashboard /wp-admin3.36 ▲0.0648.46 ▲0.16
Posts /wp-admin/edit.php3.48 ▲0.1247.58 ▲1.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.01 ▼13.82
Media Library /wp-admin/upload.php3.29 ▲0.0533.50 ▼1.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Margin Notes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.071.79 ▼0.3243.40 ▼1.71
Dashboard /wp-admin2,200 ▲95.81 ▲0.72100.83 ▼10.4341.25 ▼5.89
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0039.26 ▲2.8035.17 ▲1.88
Add New Post /wp-admin/post-new.php1,537 ▼023.36 ▲5.13674.30 ▲37.8563.81 ▲14.18
Media Library /wp-admin/upload.php1,391 ▼04.26 ▲0.01105.84 ▲7.5149.40 ▲3.35

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-margin-notes/wp-margin-notes.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPMN\\Shortcodes\\Shortcode' not found in wp-content/plugins/wp-margin-notes/classes/shortcodes/margin-notes.php:4
    • > PHP Fatal error
      Trait 'WPMN\\Singleton' not found in wp-content/plugins/wp-margin-notes/classes/main.php on line 16
    • > PHP Warning
      Use of undefined constant WPMN_DIR - assumed 'WPMN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-margin-notes/autoload.php on line 196
    • > PHP Fatal error
      Trait 'WPMN\\Singleton' not found in wp-content/plugins/wp-margin-notes/classes/shortcodes/shortcode.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: posts

wp-margin-notes/wp-margin-notes.php 85% from 13 tests

The main file in "WP Margin Notes" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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
Success! There were no dangerous files found in this plugin329 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP886313248
JavaScript23867
JSON10014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods23
▷ Static methods626.09%
▷ Public methods1565.22%
▷ Protected methods521.74%
▷ Private methods313.04%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected