84% simple-post-notes

Code Review | Simple Post Notes

WordPress plugin Simple Post Notes scored84%from 54 tests.

About plugin

  • Plugin page: simple-post-notes
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0
  • WordPress version: 6.3.1
  • First release: Mar 27, 2015
  • Latest release: Jun 22, 2022
  • Number of updates: 24
  • Update frequency: every 110.2 days
  • Top authors: Kubitomakita (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /49,862 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.00ms] Passed 4 tests

Server-side resources used by Simple Post Notes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.44 ▼11.88
Dashboard /wp-admin3.40 ▲0.0550.37 ▼16.69
Posts /wp-admin/edit.php3.52 ▲0.1654.94 ▲6.00
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.82 ▼4.72
Media Library /wp-admin/upload.php3.33 ▲0.0937.69 ▲1.29
Post Notes /wp-admin/options-general.php?page=spnotes3.2933.80

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
spnotes_settings
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Post Notes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.77 ▲0.391.61 ▼0.2341.73 ▲2.95
Dashboard /wp-admin2,205 ▲285.54 ▼0.0890.67 ▼5.2242.47 ▼8.49
Posts /wp-admin/edit.php2,154 ▲542.02 ▲0.0836.13 ▼1.7835.00 ▼1.06
Add New Post /wp-admin/post-new.php6,230 ▲4,70225.89 ▲2.79995.75 ▲327.9965.65 ▲2.64
Media Library /wp-admin/upload.php1,413 ▲134.32 ▲0.15103.57 ▼0.8547.11 ▲1.77
Post Notes /wp-admin/options-general.php?page=spnotes8772.3134.4329.70

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
Even though no errors were found, 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-post-notes/simple-post-notes.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: page, informations, note, cpt, post...

simple-post-notes/simple-post-notes.php Passed 13 tests

The primary PHP file in "Simple Post Notes" version 1.7.6 is used by WordPress to initiate all plugin functionality
66 characters long description:
Adds simple notes to post, pages and custom post type edit screen.

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 detected439 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP1160166278
PO File42828120
JavaScript218140
CSS1111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/chosen/chosen-sprite.png0.53KB0.88KB0.00%