64% origo-wp-slider

Code Review | Origo WP Slider

WordPress plugin Origo WP Slider scored64%from 54 tests.

About plugin

  • Plugin page: origo-wp-slider
  • Plugin version: 1.0.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Oct 21, 2015
  • Number of updates: 21
  • Update frequency: every 6.1 days
  • Top authors: origothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /733 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.79MB] [CPU: ▼61.30ms] Passed 4 tests

An overview of server-side resources used by Origo WP Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.30 ▼42.52
Dashboard /wp-admin2.21 ▼1.097.26 ▼48.34
Posts /wp-admin/edit.php2.21 ▼1.147.19 ▼47.43
Add New Post /wp-admin/post-new.php2.21 ▼3.676.47 ▼106.90
Media Library /wp-admin/upload.php2.21 ▼1.028.35 ▼28.86

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: 2 new tables, 6 new options
New tables
wp_origo_sliders
wp_origo_slides
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Origo WP Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲18614.03 ▼0.327.76 ▲6.0640.59 ▼4.22
Dashboard /wp-admin2,231 ▲514.98 ▼0.6998.05 ▼3.4041.65 ▼3.95
Posts /wp-admin/edit.php2,137 ▲402.40 ▲0.2640.71 ▲4.0536.91 ▲0.67
Add New Post /wp-admin/post-new.php1,551 ▲2523.58 ▲0.44688.16 ▼23.9156.49 ▲8.06
Media Library /wp-admin/upload.php1,433 ▲334.48 ▲0.3199.62 ▼11.6846.13 ▼0.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > 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 jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_origo_sliders
    • wp_origo_slides
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'options' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 4
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 18
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 12
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 4
    • > PHP Notice
      Trying to get property 'bg_color' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 22
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 12
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 17
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/origo-wp-slider/includes/AjaxCall.php:2
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/origo-wp-slider/includes/templates/slide.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: flexslider plugin, wordpress flexslider plugin, wordpress slider plugin

origo-wp-slider/OrigoSlider.php 85% from 13 tests

The main PHP script in "Origo WP Slider" version 1.0.0.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 169 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("origo-wp-slider.php" instead of "OrigoSlider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,137 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7169861,122
JavaScript31391241,017
CSS353209998

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods35
▷ Static methods12.86%
▷ Public methods3394.29%
▷ Protected methods00.00%
▷ Private methods25.71%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/left_arrow.png2.09KB1.86KB▼ 10.67%
images/right_arrow.png2.19KB1.82KB▼ 16.64%
includes/images/origo-slider.png19.62KB11.99KB▼ 38.87%