84% sage-slider

Code Review | Sage Slider

WordPress plugin Sage Slider scored 84% from 54 tests.

About plugin

  • Plugin page: sage-slider
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2018
  • Latest release: Sep 29, 2020
  • Number of updates: 11
  • Update frequency: every 88.6 days
  • Top authors: gsayed786 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.43ms] Passed 4 tests

A check of server-side resources used by Sage Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.23 ▼3.01
Dashboard /wp-admin3.32 ▲0.0150.90 ▲0.28
Posts /wp-admin/edit.php3.37 ▲0.0152.69 ▲3.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.19 ▼10.17
Media Library /wp-admin/upload.php3.24 ▲0.0139.82 ▲3.70

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sage Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.34 ▼1.029.13 ▲7.4139.99 ▼5.37
Dashboard /wp-admin2,206 ▲184.83 ▼1.03114.28 ▲5.0238.98 ▲0.57
Posts /wp-admin/edit.php2,086 ▼02.02 ▲0.0142.08 ▲7.5337.10 ▲3.45
Add New Post /wp-admin/post-new.php1,534 ▼023.37 ▲0.05681.93 ▲42.2561.76 ▲4.47
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.0799.32 ▲2.2745.09 ▲2.87

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sage-slider/custom-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sage-slider/custom-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sage-slider/slider.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_panel() on null in wp-content/plugins/sage-slider/admin/customizer/customizer-slider.php:12
    • > PHP Warning
      Use of undefined constant SAGE_CUSTOMIZER_DIR - assumed 'SAGE_CUSTOMIZER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sage-slider/admin/admin.php on line 10
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/sage-slider/admin/customizer/customizer-slider.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sage-slider/admin/customizer/class-sage-customizer.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: shortcode, slider

sage-slider/sage-slider.php 92% from 13 tests

The main PHP file in "Sage Slider" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,420 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3832672,067
PHP64393188
CSS1306165

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.16MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/default.png163.77KB164.22KB0.00%