68% alpha-cache

Code Review | Alpha Cache

WordPress plugin Alpha Cache scored68%from 54 tests.

About plugin

  • Plugin page: alpha-cache
  • Plugin version: 1.2.005
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 7, 2012
  • Latest release: Jul 24, 2017
  • Number of updates: 99
  • Update frequency: every 18.0 days
  • Top authors: shra (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,483 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.83MB] [CPU: ▼33.28ms] Passed 4 tests

A check of server-side resources used by Alpha Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.45 ▼2.11
Dashboard /wp-admin3.11 ▼0.1926.04 ▼19.72
Posts /wp-admin/edit.php3.12 ▼0.2429.23 ▼21.03
Add New Post /wp-admin/post-new.php3.11 ▼2.7824.90 ▼81.49
Media Library /wp-admin/upload.php3.11 ▼0.1224.97 ▼10.86
Alpha Cache /wp-admin/options-general.php?page=alpha-cache/ac.class.php3.1224.24

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • The plugin illegally modified 1 file (3.15KB) outside of "wp-content/plugins/alpha-cache/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alpha Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.36 ▼0.955.35 ▲3.5439.13 ▼5.56
Dashboard /wp-admin2,204 ▲185.85 ▼0.08101.37 ▼11.1039.59 ▼2.15
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0339.31 ▼4.0734.58 ▼0.76
Add New Post /wp-admin/post-new.php1,517 ▼1617.69 ▼5.34692.85 ▼6.6666.51 ▲3.85
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.0596.49 ▼9.4840.13 ▼6.39
Alpha Cache /wp-admin/options-general.php?page=alpha-cache/ac.class.php1,2331.7327.2746.86

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
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alpha-cache/ac.class.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=alpha-cache/ac.class.php
    • > Notice in wp-content/plugins/alpha-cache/ac.class.php+640
    Undefined index: action

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/alpha-cache/settings.php on line 1

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 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
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt might help

alpha-cache/alpha_cache.php 92% from 13 tests

The main PHP file in "Alpha Cache" ver. 1.2.005 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("alpha-cache.php" instead of "alpha_cache.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin797 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5151249797

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods718.92%
▷ Public methods2772.97%
▷ Protected methods00.00%
▷ Private methods1027.03%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin