67% accarousel

Code Review | Accarousel

WordPress plugin Accarousel scored67%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: 6.3.1
  • 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 /820 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: ▼1.90MB] [CPU: ▼51.57ms] Passed 4 tests

This is a short check of server-side resources used by Accarousel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.06 ▼35.91
Dashboard /wp-admin2.11 ▼1.195.95 ▼41.89
Posts /wp-admin/edit.php2.11 ▼1.257.56 ▼41.24
Add New Post /wp-admin/post-new.php2.11 ▼3.785.30 ▼87.23
Media Library /wp-admin/upload.php2.11 ▼1.127.24 ▼26.14
Accarousel Category /wp-admin/edit-tags.php?taxonomy=accarousel_cat&post_type=accarousel-items2.115.20
Accarousel Items /wp-admin/edit.php?post_type=accarousel-items2.115.54
Add New /wp-admin/post-new.php?post_type=accarousel-items2.117.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Accarousel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.62 ▼0.735.10 ▲3.3039.92 ▼5.30
Dashboard /wp-admin2,255 ▲674.85 ▼0.25106.95 ▼6.0066.86 ▲25.20
Posts /wp-admin/edit.php2,138 ▲491.98 ▼0.0439.89 ▼2.6430.96 ▼5.66
Add New Post /wp-admin/post-new.php1,707 ▲17421.76 ▼1.55729.82 ▲98.1545.90 ▼6.02
Media Library /wp-admin/upload.php1,431 ▲404.20 ▲0.00100.59 ▲0.5267.73 ▲21.63
Accarousel Category /wp-admin/edit-tags.php?taxonomy=accarousel_cat&post_type=accarousel-items1,3112.1432.0632.65
Accarousel Items /wp-admin/edit.php?post_type=accarousel-items1,1161.9431.9829.40
Add New /wp-admin/post-new.php?post_type=accarousel-items2,2957.63164.71112.29

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=accarousel-items
    • > User notice in wp-includes/functions.php+5905
    Function 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/post-new.php?post_type=accarousel-items
    • > User notice in wp-includes/functions.php+5905
    Function 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is a smoke test targeting browser errors/issues
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
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

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

"Accarousel" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("accarousel.php" instead of "wp-accarouosel-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
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

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%