64% polaroid-slider-lite

Code Review | Polaroid Slider Lite

WordPress plugin Polaroid Slider Lite scored 64% from 54 tests.

About plugin

  • Plugin page: polaroid-slider-lite
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2013
  • Latest release: Mar 4, 2013
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: wpdreams (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 3,266 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼34.77ms] Passed 4 tests

An overview of server-side resources used by Polaroid Slider Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0834.93 ▼3.85
Dashboard /wp-admin3.05 ▼0.2522.46 ▼24.95
Posts /wp-admin/edit.php3.05 ▼0.3026.97 ▼20.78
Add New Post /wp-admin/post-new.php3.05 ▼2.8322.48 ▼82.10
Media Library /wp-admin/upload.php3.05 ▼0.1723.25 ▼11.25

Server storage [IO: ▲0.26MB] [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: 52 new files
Database: 1 new table, 6 new options
New tables
wp_polaroid_slides_lite
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Polaroid Slider Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲19513.69 ▼1.079.91 ▲8.1140.93 ▼10.81
Dashboard /wp-admin2,221 ▲305.00 ▼0.90105.64 ▲1.4474.60 ▲34.39
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0338.30 ▲0.3034.65 ▼2.45
Add New Post /wp-admin/post-new.php1,533 ▼923.08 ▼0.02740.54 ▲113.2159.23 ▲10.02
Media Library /wp-admin/upload.php1,406 ▲214.10 ▼0.1096.52 ▼3.7273.17 ▲26.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/polaroid-slider-lite/polaroid-slider.php+72
    Use of undefined constant EMU2_I18N_DOMAIN - assumed 'EMU2_I18N_DOMAIN' (this will throw an Error in a future version of PHP)
  • Zombie tables detected upon uninstall: 1 table
    • wp_polaroid_slides_lite
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/polaroid-slider-lite/includes/shortcodes.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'POLAROIDSLIDER_PATH/settings/slide.php' (include_path='.:/usr/share/php') in wp-content/plugins/polaroid-slider-lite/settings.php on line 3
    • > PHP Warning
      Use of undefined constant AJAXSEARCHPRO_PATH - assumed 'AJAXSEARCHPRO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/polaroid-slider-lite/settings/types/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/polaroid-slider-lite/settings/types.class.php:568
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/polaroid-slider-lite/polaroid-slider.php:13
    • > PHP Warning
      Use of undefined constant POLAROIDSLIDER_PATH - assumed 'POLAROIDSLIDER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/polaroid-slider-lite/settings.php on line 3
    • > PHP Warning
      require_once(AJAXSEARCHPRO_PATH/settings/search.php): failed to open stream: No such file or directory in wp-content/plugins/polaroid-slider-lite/settings/types/settings.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'AJAXSEARCHPRO_PATH/settings/search.php' (include_path='.:/usr/share/php') in wp-content/plugins/polaroid-slider-lite/settings/types/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/polaroid-slider-lite/settings/slide.php:40
    • > PHP Warning
      require_once(POLAROIDSLIDER_PATH/settings/slide.php): failed to open stream: No such file or directory in wp-content/plugins/polaroid-slider-lite/settings.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: polaroid slider, slider, content slider, slides, free slider

polaroid-slider-lite/polaroid-slider.php 92% from 13 tests

This is the main PHP file of "Polaroid Slider Lite" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("polaroid-slider-lite.php" instead of "polaroid-slider.php")

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 detected4,233 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript243062262,654
PHP757451,092
CSS2790487

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3594.59%
▷ Protected methods25.41%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
18 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/fullscreen.png3.91KB1.10KB▼ 71.83%
slider.png3.50KB0.87KB▼ 75.10%
settings/types/icons/labelposition.png12.28KB5.62KB▼ 54.27%
settings/types/icons/point.png2.79KB0.16KB▼ 94.11%
settings/types/icons/settings.png4.00KB0.96KB▼ 76.03%