10% acronym-manager

Code Review | Acronym Manager

WordPress plugin Acronym Manager scored10%from 54 tests.

About plugin

  • Plugin page: acronym-manager
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.2.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2013
  • Latest release: Mar 26, 2013
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: danfinnigan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,781 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/acronym-manager/acronym-manager.php+85
    Non-static method Acronym_Manager::theme_html5_check() should not be called statically

Server metrics [RAM: ▼1.71MB] [CPU: ▼45.91ms] Passed 4 tests

This is a short check of server-side resources used by Acronym Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.92 ▼30.70
Dashboard /wp-admin2.30 ▼1.0111.20 ▼39.89
Posts /wp-admin/edit.php2.30 ▼1.0613.06 ▼32.50
Add New Post /wp-admin/post-new.php2.30 ▼3.5911.47 ▼80.55
Media Library /wp-admin/upload.php2.30 ▼0.9311.29 ▼21.48
Acronym Manager /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php2.3011.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 11 new options
New WordPress options
acronym_content
widget_theysaidso_widget
db_upgraded
can_compress_scripts
acronym_comments
widget_recent-comments
acronym_html5
widget_recent-posts
theysaidso_admin_options
acronym_acronyms
...

Browser metrics Passed 4 tests

Checking browser requirements for Acronym Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.33 ▼1.441.74 ▼0.2138.72 ▼6.68
Dashboard /wp-admin2,214 ▲265.89 ▼0.01104.41 ▼8.7839.80 ▼7.25
Posts /wp-admin/edit.php2,100 ▲112.00 ▲0.0041.27 ▲6.4634.10 ▼4.03
Add New Post /wp-admin/post-new.php1,521 ▲417.41 ▼0.34684.89 ▲19.8057.49 ▲2.81
Media Library /wp-admin/upload.php1,396 ▲144.20 ▲0.07106.76 ▲5.2347.17 ▲2.74
Acronym Manager /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php1,0042.0627.2329.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Acronym_Manager_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_acronym_manager_widget
    • db_upgraded
    • widget_recent-posts

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Acronym_Manager_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Acronym_Manager::add_pages() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+493
    Non-static method Acronym_Manager::get_textdomain() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Acronym_Manager::management_handler() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.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.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+513
    Non-static method Acronym_Manager::get_parent_url() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Warning in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+39
    substr() expects parameter 2 to be int, string given
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Acronym_Manager::admin_page() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+174
    Non-static method Acronym_Manager::admin_tabs() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+194
    Non-static method Acronym_Manager::manage_acronyms() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+279
    Non-static method Acronym_Manager::count_acronyms() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Notice in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+285
    Undefined index: s
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+298
    Non-static method Acronym_Manager::show_pagination_bar() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+297
    Non-static method Acronym_Manager::show_acronym_list() should not be called statically
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Notice in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+389
    Undefined variable: i
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Notice in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+306
    Undefined index: action
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-class.php+309
    Non-static method Acronym_Manager::add_acronym_form() should not be called statically

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 fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/acronym-manager/acronym-manager.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acronym-manager/acronym-manager.php:36
    • > PHP Notice
      Undefined index: acronym-export in wp-content/plugins/acronym-manager/php/acronym-export.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/acronym-manager/php/acronym-manager-widget.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: formatting, glossary, acronym, post, define

acronym-manager/acronym-manager.php 92% from 13 tests

"Acronym Manager" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 452 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin668 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4143131654
JavaScript12114

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity44.00
▷ Minimum class complexity9.00
▷ Maximum class complexity79.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected