73% alt-manager

Code Review | Alt Manager

WordPress plugin Alt Manager scored73%from 54 tests.

About plugin

  • Plugin page: alt-manager
  • Plugin version: 1.5.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 21, 2020
  • Latest release: Sep 21, 2023
  • Number of updates: 236
  • Update frequency: every 5.5 days
  • Top authors: arabianmido (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /25,610 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 gracefully, with no errors

Server metrics [RAM: ▲0.60MB] [CPU: ▼0.59ms] 75% from 4 tests

This is a short check of server-side resources used by Alt Manager
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,877.53ms on /wp-admin/options-general.php?page=alt-manager)
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6137.25 ▼0.16
Dashboard /wp-admin3.92 ▲0.6150.28 ▲1.08
Posts /wp-admin/edit.php3.97 ▲0.6149.65 ▲0.20
Add New Post /wp-admin/post-new.php6.45 ▲0.5794.53 ▼3.47
Media Library /wp-admin/upload.php3.84 ▲0.6144.50 ▲11.61
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0436.65
Alt Manager /wp-admin/options-general.php?page=alt-manager3.921,877.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 201 new files
Database: no new tables, 19 new options
New WordPress options
home_images_title
home_images_alt
post_images_title
post_images_alt
pages_images_alt
cpt_images_title
can_compress_scripts
cpt_images_alt
widget_recent-comments
pages_images_title
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alt Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.44 ▼0.941.62 ▼0.1028.33 ▼16.26
Dashboard /wp-admin2,240 ▲495.19 ▼0.62115.50 ▲8.1841.56 ▼1.15
Posts /wp-admin/edit.php2,123 ▲312.32 ▲0.3341.97 ▲6.6540.78 ▲7.84
Add New Post /wp-admin/post-new.php1,534 ▲123.46 ▲5.04568.31 ▼34.1051.56 ▼1.29
Media Library /wp-admin/upload.php1,422 ▲314.62 ▲0.3897.95 ▼7.8442.94 ▼2.39
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0841.8830.2228.37
Alt Manager /wp-admin/options-general.php?page=alt-manager9921.8825.5658.23

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/alt-manager/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 19 options in the database
    • widget_theysaidso_widget
    • home_images_alt
    • fs_active_plugins
    • pages_images_title
    • fs_debug_mode
    • fs_accounts
    • can_compress_scripts
    • cpt_images_title
    • home_images_title
    • post_images_alt
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/alt-manager/inc/alm-functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alt-manager/inc/alm-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alt-manager/inc/alm-empty-generator.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The main PHP script in "Alt Manager" version 1.5.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 166 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected36,045 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,50617,63235,570
JavaScript65165246
CSS1730118
PO File1364995
XML13016

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity95.79
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,357
▷ Static methods20114.81%
▷ Public methods95270.15%
▷ Protected methods322.36%
▷ Private methods37327.49%
Functions109
▷ Named functions109100.00%
▷ Anonymous functions00.00%
Constants167
▷ Global constants12071.86%
▷ Class constants4728.14%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/remove-icon.png0.33KB0.42KB0.00%
assets/img/add-icon.png0.85KB0.80KB▼ 5.07%
assets/img/select2.png0.51KB0.99KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%