83% mage-carousel

Code Review | Mage Carousel

WordPress plugin Mage Carousel scored 83% from 54 tests.

About plugin

  • Plugin page: mage-carousel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 6.3.1
  • First release: Jul 21, 2017
  • Latest release: Jul 21, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: magepeopleteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.40ms] Passed 4 tests

A check of server-side resources used by Mage Carousel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.58 ▼6.28
Dashboard /wp-admin3.34 ▲0.0444.06 ▼3.03
Posts /wp-admin/edit.php3.38 ▲0.0349.74 ▲5.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.76 ▲1.46
Media Library /wp-admin/upload.php3.26 ▲0.0336.19 ▲2.24
Add New /wp-admin/post-new.php?post_type=mpc_carousel3.3349.17
Carousel /wp-admin/edit.php?post_type=mpc_carousel3.3038.31
Category /wp-admin/edit-tags.php?taxonomy=mpc_carousel_cat&post_type=mpc_carousel3.2534.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Mage Carousel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21813.60 ▼0.7810.03 ▲8.2737.14 ▼4.15
Dashboard /wp-admin2,234 ▲485.84 ▲0.8897.35 ▼13.2238.79 ▼2.01
Posts /wp-admin/edit.php2,120 ▲342.01 ▼0.0139.70 ▲4.3934.80 ▼0.07
Add New Post /wp-admin/post-new.php1,568 ▲5418.42 ▲0.79621.78 ▼65.6357.36 ▲6.37
Media Library /wp-admin/upload.php1,422 ▲344.14 ▼0.1894.99 ▼15.7543.01 ▼6.08
Add New /wp-admin/post-new.php?post_type=mpc_carousel1,7253.5370.3733.56
Carousel /wp-admin/edit.php?post_type=mpc_carousel1,0921.9530.1228.25
Category /wp-admin/edit-tags.php?taxonomy=mpc_carousel_cat&post_type=mpc_carousel1,2902.1426.6626.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Mage_Settings_API' not found in wp-content/plugins/mage-carousel/inc/admin_settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mage-carousel/inc/custom_cpt.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mage-carousel/inc/custom_cpt.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mage-carousel/inc/shortcode.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in mage-carousel/assets to your readme.txt
The official readme.txt might help

mage-carousel/index.php 85% from 13 tests

Analyzing the main PHP file in "Mage Carousel" version 1.0
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mage-carousel.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin659 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5195210633
CSS301018
JavaScript2058

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity38.00
▷ Minimum class complexity3.00
▷ Maximum class complexity73.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin