99% annotation

Code Review | Annotation

WordPress plugin Annotation scored 99% from 54 tests.

About plugin

  • Plugin page: annotation
  • Plugin version: 0.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 5.8.1
  • First release: Jun 12, 2013
  • Latest release: Jun 13, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: borgboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,036 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼145.23ms] Passed 4 tests

A check of server-side resources used by Annotation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.92 ▲22.25
Dashboard /wp-admin3.06 ▲0.0142.38 ▼4.18
Posts /wp-admin/edit.php3.11 ▼0.0040.16 ▼8.00
Add New Post /wp-admin/post-new.php5.42 ▼0.0184.98 ▼565.23
Media Library /wp-admin/upload.php3.01 ▲0.0030.95 ▼3.49

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 888 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Annotation: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲17816.25 ▲0.6511.81 ▲2.7345.33 ▼2.50
Dashboard /wp-admin2,973 ▲366.11 ▲0.17142.23 ▼9.71104.02 ▼14.62
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0163.66 ▼8.0795.14 ▲2.51
Add New Post /wp-admin/post-new.php1,615 ▲11521.41 ▲2.64285.61 ▼77.43106.60 ▼10.65
Media Library /wp-admin/upload.php1,807 ▼35.00 ▲0.01168.53 ▲1.24133.35 ▲12.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot of the plugin with text anchor), #2 (Screenshot of the plugin with image anchor), #3 (Screenshot of the plugin with le-frog and cupertino themes)
You can take inspiration from this readme.txt

annotation/Annotation.php 85% from 13 tests

The main PHP file in "Annotation" ver. 0.5.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("annotation.php" instead of "Annotation.php")
  • Domain Path: The domain path folder does not exist ("/languages/")

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
Success! There were no dangerous files found in this plugin50,363 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
CSS1542,4553,94250,246
PHP11922117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
708 PNG files occupy 1.64MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/1.9.2/trontastic/images/ui-icons_b8ec79_256x240.png4.27KB4.11KB▼ 3.78%
themes/1.10.3/dot-luv/images/ui-bg_diagonals-thick_15_0b3e6f_40x40.png0.41KB0.15KB▼ 62.97%
themes/1.10.3/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png0.41KB0.15KB▼ 62.35%
themes/1.10.3/dark-hive/images/ui-bg_glass_40_ffc73d_1x400.png0.31KB0.16KB▼ 49.37%
themes/1.9.2/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png1.83KB1.14KB▼ 37.89%