72% sliceshow

Code Review | SliceShow

WordPress plugin SliceShow scored72%from 54 tests.

About plugin

  • Plugin page: sliceshow
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2013
  • Latest release: Jun 18, 2013
  • Number of updates: 9
  • Update frequency: every 22.3 days
  • Top authors: tylerjones (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /7,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.26ms] Passed 4 tests

Analyzing server-side resources used by SliceShow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.3249.76 ▲1.61
Dashboard /wp-admin3.88 ▲0.2554.80 ▼8.16
Posts /wp-admin/edit.php3.93 ▲0.2553.90 ▲1.19
Add New Post /wp-admin/post-new.php6.42 ▲0.28100.31 ▼10.82
Media Library /wp-admin/upload.php3.74 ▲0.2542.66 ▲0.75
Add New /wp-admin/post-new.php?post_type=sliceshow3.7545.44
All Slideshows /wp-admin/edit.php?post_type=sliceshow3.8542.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

SliceShow: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.60 ▼0.7810.75 ▲8.7743.67 ▲1.51
Dashboard /wp-admin2,229 ▲495.72 ▲0.0589.46 ▼2.5339.77 ▼4.35
Posts /wp-admin/edit.php2,147 ▲472.33 ▲0.2137.90 ▼3.7933.16 ▼1.45
Add New Post /wp-admin/post-new.php1,560 ▲2823.47 ▲0.09646.73 ▲26.2268.54 ▲23.51
Media Library /wp-admin/upload.php1,438 ▲384.30 ▲0.09103.22 ▼2.5841.94 ▼1.16
Add New /wp-admin/post-new.php?post_type=sliceshow1,7962.7654.5380.42
All Slideshows /wp-admin/edit.php?post_type=sliceshow1,0642.2532.7627.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=sliceshow
    • > Deprecated in wp-content/plugins/sliceshow/lib/sliceshow.meta-box.class.php+98
    Non-static method SliceShow_Helper::sliceshow_shortcode_shortcut() should not be called statically

SRP 0% 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
Please fix the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sliceshow/lib/meta-fields/slide-text-title.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/text.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/slide-hidden.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/slide-text-url.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/select.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/slide-text.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/radio.inc.php
    • > /wp-content/plugins/sliceshow/lib/meta-fields/textarea.inc.php
  • 96× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sliceshow/lib/meta-fields/textarea.inc.php on line 3
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/sliceshow/lib/meta-fields/text.inc.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sliceshow/lib/meta-fields/radio.inc.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sliceshow/lib/meta-fields/select.inc.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sliceshow/lib/meta-fields/select.inc.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sliceshow/lib/meta-fields/slide-text.inc.php on line 2
    • > PHP Notice
      Undefined variable: sk in wp-content/plugins/sliceshow/lib/meta-fields/slide-text.inc.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sliceshow/lib/meta-fields/textarea.inc.php on line 2
    • > PHP Notice
      Undefined variable: gk in wp-content/plugins/sliceshow/lib/meta-fields/slide-text.inc.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sliceshow/lib/sliceshow.public.class.php:25

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 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

sliceshow/slice-show.php 92% from 13 tests

"SliceShow" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sliceshow.php" instead of "slice-show.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,193 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61471541,525
PHP182892821,417
CSS31426251

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.14
▷ Minimum class complexity2.00
▷ Maximum class complexity71.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods11.82%
▷ Public methods4683.64%
▷ Protected methods00.00%
▷ Private methods916.36%
Functions1
▷ Named functions1100.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
8 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-sliceshow-32.png1.32KB1.20KB▼ 9.37%
images/icon-trash.png77.62KB0.29KB▼ 99.63%
images/icon-sort-handle.png0.26KB0.15KB▼ 44.28%
images/icon-sliceshow-menu.png1.43KB1.23KB▼ 14.00%
images/sliceshow-arrows-default.png0.68KB0.31KB▼ 54.44%