10% acronym-manager

Code Review | Acronym Manager

WordPress plugin Acronym Manager scored 10% 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: 5.9.2
  • 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

10+ active / 1,503 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > 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: ▼2.19MB] [CPU: ▼341.13ms] Passed 4 tests

A check of server-side resources used by Acronym Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.347.39 ▼43.71
Dashboard /wp-admin2.20 ▼1.217.82 ▼24.73
Posts /wp-admin/edit.php2.20 ▼1.447.93 ▼35.53
Add New Post /wp-admin/post-new.php2.20 ▼4.788.35 ▼1,260.56
Media Library /wp-admin/upload.php2.20 ▼1.107.07 ▼15.65
Acronym Manager /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php2.208.15

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 5 new options
New WordPress options
acronym_acronyms
acronym_comments
acronym_html5
acronym_content
widget_acronym_manager_widget

Browser metrics Passed 4 tests

Acronym Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,812 ▲5415.77 ▲0.105.64 ▼0.882.99 ▲0.19
Dashboard /wp-admin2,901 ▲406.01 ▼0.16116.54 ▼22.92158.58 ▼4.90
Posts /wp-admin/edit.php2,697 ▲33.23 ▼0.0165.03 ▲3.31138.89 ▲0.98
Add New Post /wp-admin/post-new.php1,668 ▲715.98 ▼0.07412.01 ▼7.88149.76 ▼7.35
Media Library /wp-admin/upload.php1,708 ▲75.51 ▼0.02149.80 ▼0.59184.24 ▼20.03
Acronym Manager /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php1,3182.4354.61132.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/acronym-manager/php/acronym-manager-widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; Acronym_Manager_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_acronym_manager_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > 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-widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; Acronym_Manager_Widget has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=acronym-manager/php/acronym-manager-class.php
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget 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+307
    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+307
    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+5610
    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+307
    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+5316
    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× PHP files trigger errors when accessed directly with GET requests:
    • > 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 Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/acronym-manager/php/acronym-manager-widget.php:15
    • > PHP Notice
      Undefined index: acronym-export in wp-content/plugins/acronym-manager/php/acronym-export.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: glossary, define, formatting, acronym, post

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

Analyzing the main PHP file in "Acronym Manager" version 0.1
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 452 characters long)

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
Good job! No executable or dangerous file extensions detected668 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4143131654
JavaScript12114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin