84% note-for-posts

Code Review | Note For Posts

WordPress plugin Note For Posts scored 84% from 54 tests.

About plugin

  • Plugin page: note-for-posts
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 5.8.1
  • First release: Apr 7, 2016
  • Latest release: May 29, 2016
  • Number of updates: 11
  • Update frequency: every 4.8 days
  • Top authors: esstat17 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼140.92ms] Passed 4 tests

A check of server-side resources used by Note For Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.1339.78 ▲8.43
Dashboard /wp-admin3.25 ▲0.2044.31 ▲0.65
Posts /wp-admin/edit.php3.37 ▲0.2645.82 ▼2.71
Add New Post /wp-admin/post-new.php5.63 ▲0.2092.47 ▼556.08
Media Library /wp-admin/upload.php3.20 ▲0.1936.31 ▼5.55
Add New /wp-admin/post-new.php?post_type=note3.3054.36
Tags /wp-admin/edit-tags.php?taxonomy=note_tag&post_type=note3.1932.89
Notes /wp-admin/edit.php?post_type=note3.2435.36
Settings /wp-admin/edit.php?post_type=note&page=n4p-submenu-page3.1730.89

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 1 new option
New WordPress options
widget_n4p_widget_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Note For Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲26716.35 ▲0.8911.59 ▲3.3746.94 ▼7.28
Dashboard /wp-admin3,031 ▲976.16 ▲0.23161.23 ▲16.15121.83 ▲13.48
Posts /wp-admin/edit.php2,816 ▲802.72 ▲0.0464.57 ▲2.5994.22 ▲0.16
Add New Post /wp-admin/post-new.php1,553 ▼11920.54 ▲1.66360.11 ▲6.46106.30 ▼9.36
Media Library /wp-admin/upload.php1,803 ▼75.06 ▲0.04145.96 ▼1.03125.52 ▲0.97
Add New /wp-admin/post-new.php?post_type=note3,2389.25227.25173.45
Tags /wp-admin/edit-tags.php?taxonomy=note_tag&post_type=note1,7752.5763.4278.69
Notes /wp-admin/edit.php?post_type=note1,5292.6563.6080.02
Settings /wp-admin/edit.php?post_type=note&page=n4p-submenu-page1,4532.3661.3892.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_n4p_widget_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/note-for-posts/includes/admin/wp-ajax-action.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/note-for-posts/includes/wp-footer-scripts.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: page, post, download, product, edd

note-for-posts/note-for-posts.php 92% from 13 tests

The main PHP file in "Note For Posts" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected1,477 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP17245654912
CSS32737493
JavaScript3312172

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arr.png5.43KB1.15KB▼ 78.84%
assets/images/admin/chosen-sprite.png0.53KB0.88KB0.00%
assets/images/admin/chosen-sprite@2x.png0.72KB0.83KB0.00%