77% accarousel

Code Review | Accarousel

WordPress plugin Accarousel scored 77% from 54 tests.

About plugin

  • Plugin page: accarousel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 5.9.2
  • First release: Dec 17, 2015
  • Latest release: Mar 31, 2016
  • Number of updates: 18
  • Update frequency: every 5.9 days
  • Top authors: RojaIT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼2.46MB] [CPU: ▼354.96ms] Passed 4 tests

A check of server-side resources used by Accarousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.91 ▼1.614.33 ▼46.59
Dashboard /wp-admin1.93 ▼1.483.59 ▼29.93
Posts /wp-admin/edit.php1.93 ▼1.725.06 ▼30.72
Add New Post /wp-admin/post-new.php1.93 ▼5.053.92 ▼1,312.61
Media Library /wp-admin/upload.php1.93 ▼1.373.85 ▼22.31
Add New /wp-admin/post-new.php?post_type=accarousel-items1.934.32
Accarousel Category /wp-admin/edit-tags.php?taxonomy=accarousel_cat&post_type=accarousel-items1.933.96
Accarousel Items /wp-admin/edit.php?post_type=accarousel-items1.934.63

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Accarousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,959 ▲20515.98 ▲0.358.79 ▲2.522.97 ▲0.18
Dashboard /wp-admin2,940 ▲826.10 ▼0.07120.65 ▼14.72172.89 ▲13.71
Posts /wp-admin/edit.php2,751 ▲603.24 ▼0.0065.78 ▼2.91146.31 ▼1.74
Add New Post /wp-admin/post-new.php1,701 ▼1617.07 ▼4.89415.82 ▼45.93184.17 ▲23.00
Media Library /wp-admin/upload.php1,735 ▲405.55 ▲0.04128.38 ▼17.96204.02 ▲10.68
Add New /wp-admin/post-new.php?post_type=accarousel-items2,9919.98195.59214.93
Accarousel Category /wp-admin/edit-tags.php?taxonomy=accarousel_cat&post_type=accarousel-items1,6832.9156.49115.97
Accarousel Items /wp-admin/edit.php?post_type=accarousel-items1,4433.0961.53121.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the accarousel-main-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=accarousel-items
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the accarousel-main-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=accarousel-items
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the accarousel-main-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accarousel/wp-accarouosel-main.php:35

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)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

accarousel/wp-accarouosel-main.php 85% from 13 tests

The primary PHP file in "Accarousel" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("accarousel.php" instead of "wp-accarouosel-main.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 184 characters long)

Code Analysis Passed 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 detected275 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15141180
CSS10094
JavaScript1031

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png2.90KB0.20KB▼ 93.20%