56% gmo-slider

Code Review | Plugin Name: GMO Slider

WordPress plugin Plugin Name: GMO Sliderscored 56% from 54 tests.

About plugin

  • Plugin page: gmo-slider
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 5.8.1
  • First release: Dec 1, 2014
  • Latest release: Jan 29, 2016
  • Number of updates: 18
  • Update frequency: every 49.9 days
  • Top authors: Takeaki Nagashima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,221 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.46MB] [CPU: ▼181.88ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: GMO Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼0.5511.04 ▼12.71
Dashboard /wp-admin2.19 ▼0.8621.09 ▼26.37
Posts /wp-admin/edit.php2.19 ▼0.9213.72 ▼30.91
Add New Post /wp-admin/post-new.php2.19 ▼3.2411.26 ▼643.34
Media Library /wp-admin/upload.php2.19 ▼0.8110.93 ▼26.89
General Settings /wp-admin/edit.php?post_type=gmoslider&page=general_settings2.1913.93
GMO Slider /wp-admin/edit.php?post_type=gmoslider2.1913.45
Add New /wp-admin/post-new.php?post_type=gmoslider2.1915.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 81 new files
Database: no new tables, 1 new option
New WordPress options
widget_gmosliderwidget

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: GMO Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲17116.54 ▲1.039.34 ▼0.9451.81 ▼3.33
Dashboard /wp-admin3,034 ▲1006.54 ▲0.61142.75 ▼13.90113.60 ▲5.96
Posts /wp-admin/edit.php2,806 ▲672.76 ▲0.0971.01 ▲2.98117.25 ▲17.58
Add New Post /wp-admin/post-new.php1,561 ▼5420.93 ▼0.56357.45 ▲67.15127.23 ▲14.30
Media Library /wp-admin/upload.php1,872 ▲655.30 ▲0.26128.24 ▼21.57127.52 ▲6.23
General Settings /wp-admin/edit.php?post_type=gmoslider&page=general_settings2,5133.8677.69102.02
GMO Slider /wp-admin/edit.php?post_type=gmoslider1,6854.4287.5873.59
Add New /wp-admin/post-new.php?post_type=gmoslider3,7375.08123.58119.93

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/gmo-slider/classes/GMOsliderWidget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; GMOsliderWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_gmosliderwidget

Smoke tests 0% 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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/gmo-slider/classes/GMOsliderWidget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; GMOsliderWidget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in GMOsliderWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/gmo-slider/classes/GMOsliderSlideInserter.php+87
    Undefined index: search

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/gmo-slider/views/GMOsliderSlide/video.php
    • > /wp-content/plugins/gmo-slider/views/GMOsliderPostType/settings.php
    • > /wp-content/plugins/gmo-slider/views/GMOslider/gmoslider.php
  • 32× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/gmo-slider/views/GMOsliderPostType/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gmo-slider/views/GMOsliderSlideInserter/insert-text-button.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gmo-slider/gmoslider.php:42
    • > PHP Notice
      Undefined variable: sessionID in wp-content/plugins/gmo-slider/views/GMOslider/gmoslider.php on line 1
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/gmo-slider/views/GMOsliderPostType/style-settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gmo-slider/views/GMOsliderGeneralSettings/custom-styles-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gmo-slider/views/GMOsliderSlide/admin_video.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gmo-slider/views/GMOsliderShortcode/shortcode-inserter.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/gmo-slider/views/GMOsliderSlide/admin_attachment.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gmo-slider/views/GMOsliderPostType/slides.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > Network (severe)
    wp-content/plugins/gmo-slider/css/gmo-admin-plugin.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > Network (severe)
    wp-content/plugins/gmo-slider/images/bnr_themes.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > Network (severe)
    wp-content/plugins/gmo-slider/images/bnr_plugins.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gmoslider
    • > Network (severe)
    wp-content/plugins/gmo-slider/images/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: GMO Slider=== )
You can take inspiration from this readme.txt

gmo-slider/gmoslider.php 77% from 13 tests

The principal PHP file in "Plugin Name: GMO Slider" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gmo-slider.php" instead of "gmoslider.php")
  • Description: The description should be shorter than 140 characters (currently 170 characters long)
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,836 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP38828283,223
JavaScript5143194979
PO File11340314
CSS63326301
SVG10019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.36
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods77
▷ Static methods6584.42%
▷ Public methods7597.40%
▷ Protected methods00.00%
▷ Private methods22.60%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.35MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wpshop_logo.png7.22KB5.91KB▼ 18.12%
images/GMOslider/light-bullet.png2.87KB0.26KB▼ 90.88%
images/GMOsliderSlideInserter/close.png0.52KB0.30KB▼ 42.96%
images/GMOsliderPostType/adminIcon.png2.80KB0.13KB▼ 95.46%
images/wpcloud_bnr_plugins.png9.14KB4.07KB▼ 55.50%