84% image-annotations

Code Review | Image Annotations

WordPress plugin Image Annotations scored84%from 54 tests.

About plugin

  • Plugin page: image-annotations
  • Plugin version: 1.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2014
  • Latest release: Oct 5, 2015
  • Number of updates: 17
  • Update frequency: every 18.4 days
  • Top authors: M03Gen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.58ms] Passed 4 tests

Analyzing server-side resources used by Image Annotations
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1038.22 ▼5.22
Dashboard /wp-admin3.40 ▲0.1045.80 ▼11.60
Posts /wp-admin/edit.php3.45 ▲0.0947.81 ▼1.00
Add New Post /wp-admin/post-new.php5.98 ▲0.1081.83 ▼8.51
Media Library /wp-admin/upload.php3.32 ▲0.0935.37 ▲1.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Annotations
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.28 ▼1.021.52 ▼0.2240.45 ▼3.54
Dashboard /wp-admin2,220 ▲295.83 ▲0.94103.55 ▼6.1239.68 ▼6.50
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0239.81 ▲3.6836.32 ▼0.15
Add New Post /wp-admin/post-new.php1,540 ▲723.16 ▼0.34621.53 ▼67.0154.10 ▲6.01
Media Library /wp-admin/upload.php1,396 ▲54.24 ▲0.0396.64 ▼4.8542.77 ▼2.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/image-annotations/image-annotations.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

image-annotations/image-annotations.php 92% from 13 tests

"Image Annotations" version 1.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 192 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,014 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP13234362
CSS36627333
JavaScript24341299
SVG10020

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.30
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%
Functions15
▷ Named functions15100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%