10% annoto

Code Review | Annoto Plugin for WordPress

WordPress plugin Annoto Plugin for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: annoto
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.7.9
  • WordPress version: 6.3.1
  • First release: Jan 4, 2018
  • Latest release: Feb 7, 2018
  • Number of updates: 8
  • Update frequency: every 28.9 days
  • Top authors: annoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /792 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

Server metrics [RAM: ▼0.13MB] [CPU: ▼10.84ms] Passed 4 tests

A check of server-side resources used by Annoto Plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.7015.07 ▼30.94
Dashboard /wp-admin3.37 ▲0.0651.14 ▼3.09
Posts /wp-admin/edit.php3.48 ▲0.1249.73 ▼4.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.40 ▼5.30
Media Library /wp-admin/upload.php3.29 ▲0.0637.53 ▼0.82
Annoto /wp-admin/options-general.php?page=annoto-key-config3.2933.22

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
annoto_settings
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Annoto Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /11,359 ▲8,59826.45 ▲12.1621.08 ▲19.3476.73 ▲33.79
Dashboard /wp-admin2,202 ▲275.57 ▼0.1790.50 ▼13.9241.81 ▲1.34
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0939.43 ▼2.2636.42 ▼3.68
Add New Post /wp-admin/post-new.php1,529 ▼623.62 ▲5.53612.75 ▼17.6253.95 ▼15.88
Media Library /wp-admin/upload.php1,407 ▲44.25 ▲0.0297.44 ▼0.3145.16 ▼1.76
Annoto /wp-admin/options-general.php?page=annoto-key-config1,3641.8229.9031.33

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/annoto/annoto.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/annoto/views/settings.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

annoto/annoto.php 92% from 13 tests

The main file in "Annoto Plugin for WordPress" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Git Repository: Please do not include Git repositories in your plugin

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 plugin8,316 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS23007,033
PHP598176617
JavaScript2620352
SVG111225
Markdown147089

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.67
▷ Minimum class complexity6.00
▷ Maximum class complexity17.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods26100.00%
▷ Public methods1973.08%
▷ Protected methods00.00%
▷ Private methods726.92%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/lock.png21.49KB10.62KB▼ 50.59%
src/img/key.png21.77KB9.40KB▼ 56.81%