68% acronyms-2

Code Review | Acronyms 2

WordPress plugin Acronyms 2 scored68%from 54 tests.

About plugin

  • Plugin page: acronyms-2
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 17, 2011
  • Latest release: Jul 4, 2022
  • Number of updates: 38
  • Update frequency: every 103.3 days
  • Top authors: renaissancedesign (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /5,486 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.81MB] [CPU: ▼29.03ms] Passed 4 tests

An overview of server-side resources used by Acronyms 2
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.55 ▲2.52
Dashboard /wp-admin3.13 ▼0.1732.45 ▼15.05
Posts /wp-admin/edit.php3.13 ▼0.2325.56 ▼20.90
Add New Post /wp-admin/post-new.php3.13 ▼2.7623.61 ▼67.54
Media Library /wp-admin/upload.php3.13 ▼0.1021.29 ▼12.61
Acronyms /wp-admin/tools.php?page=acronyms-2/acronyms.php3.1322.31

Server storage [IO: ▲0.07MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 10 new options
New WordPress options
acronym_html5
acronym_acronyms
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
acronym_comments
acronym_content
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Acronyms 2
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.17 ▼0.091.80 ▲0.0940.05 ▼0.34
Dashboard /wp-admin2,199 ▲355.62 ▼0.0484.50 ▼16.7736.55 ▼5.24
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0633.51 ▼4.3333.24 ▲0.36
Add New Post /wp-admin/post-new.php1,529 ▲123.26 ▲0.31605.63 ▲8.7156.41 ▲3.04
Media Library /wp-admin/upload.php1,401 ▲14.22 ▲0.0496.12 ▼9.7241.98 ▼3.03
Acronyms /wp-admin/tools.php?page=acronyms-2/acronyms.php1,5742.0327.3428.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=acronyms-2/acronyms.php
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acronyms-2/acronyms.php
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acronyms-2/acronyms.php:691

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The admin UI), #2 (Acronyms output in Twenty Eleven)
The official readme.txt is a good inspiration

acronyms-2/acronyms.php 85% from 13 tests

This is the main PHP file of "Acronyms 2" version 2.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 296 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acronyms-2.php" instead of "acronyms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin599 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17484544
PO File1192455

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods15100.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.10KB12.01KB▼ 60.10%
screenshot-2.png13.63KB13.25KB▼ 2.78%