81% instant-annotation

Code Review | Instant Annotation

WordPress plugin Instant Annotation scored 81% from 54 tests.

About plugin

  • Plugin page: instant-annotation
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 5.9.2
  • First release: Dec 19, 2017
  • Latest release: Nov 10, 2020
  • Number of updates: 29
  • Update frequency: every 36.5 days
  • Top authors: semantify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,237 total downloads

Benchmarks

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

A check of server-side resources used by Instant Annotation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0455.16 ▼4.16
Dashboard /wp-admin3.46 ▲0.0531.67 ▼0.27
Posts /wp-admin/edit.php3.68 ▲0.0443.10 ▲6.20
Add New Post /wp-admin/post-new.php6.07 ▼0.8982.71 ▼1,215.42
Media Library /wp-admin/upload.php3.34 ▲0.0528.82 ▲1.81
Instant Annotation /wp-admin/options-general.php?page=iasemantify3.3926.77

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Instant 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,901 ▲14716.35 ▲0.739.91 ▲4.212.41 ▼0.42
Dashboard /wp-admin2,899 ▲316.18 ▲0.01117.93 ▼27.71172.81 ▼13.81
Posts /wp-admin/edit.php2,695 ▲43.24 ▲0.0063.79 ▼8.00209.86 ▲50.99
Add New Post /wp-admin/post-new.php2,096 ▲32325.11 ▲3.39425.05 ▼24.50267.95 ▲103.18
Media Library /wp-admin/upload.php1,701 ▲35.53 ▲0.05178.87 ▲28.11182.71 ▼15.85
Instant Annotation /wp-admin/options-general.php?page=iasemantify1,3183.6695.71425.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=iasemantify
    • > Notice in wp-content/plugins/instant-annotation/admin/partials/iasemantify-admin-display.php+31
    Trying to access array offset on value of type bool

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/instant-annotation/public/partials/iasemantify-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/instant-annotation/public/partials/deploy_annotations.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/instant-annotation/admin/partials/meta_boxes_display.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/instant-annotation/admin/partials/iasemantify-admin-display.php:3

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 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5 in instant-annotation/assets to your readme.txt
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === instant-annotation === )
The official readme.txt is a good inspiration

instant-annotation/iasemantify.php 85% from 13 tests

The main PHP script in "Instant Annotation" version 2.4.2 is automatically included on every request by WordPress
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
  • Main file name: Name the main plugin file the same as the plugin slug ("instant-annotation.php" instead of "iasemantify.php")

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
Everything looks great! No dangerous files found in this plugin1,456 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP142925741,343
JavaScript3115693
Markdown19012
CSS2148

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/arrow3.png3.73KB0.67KB▼ 82.16%