84% showcase-theme-preview-reloaded

Code Review | Showcase Theme Preview Reloaded

WordPress plugin Showcase Theme Preview Reloaded scored84%from 54 tests.

About plugin

  • Plugin page: showcase-theme-pr...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: May 15, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: wpamanuke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.36ms] Passed 4 tests

A check of server-side resources used by Showcase Theme Preview Reloaded
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.56 ▲3.15
Dashboard /wp-admin3.35 ▲0.0544.67 ▼4.84
Posts /wp-admin/edit.php3.40 ▲0.0547.94 ▼3.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.36 ▼11.05
Media Library /wp-admin/upload.php3.28 ▲0.0535.30 ▲1.83

Server storage [IO: ▲0.01MB] [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: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_stpr-theme-preview
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Showcase Theme Preview Reloaded
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.46 ▲0.222.26 ▲0.4643.36 ▼0.90
Dashboard /wp-admin2,206 ▲154.86 ▲0.03108.00 ▲6.3639.81 ▼2.68
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0339.29 ▼0.9235.98 ▲0.13
Add New Post /wp-admin/post-new.php1,533 ▲523.09 ▲4.82667.09 ▲24.3856.79 ▲2.91
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.09102.20 ▲2.2444.01 ▼1.51

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_stpr-theme-preview
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/showcase-theme-preview-reloaded/includes/shortcode.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/showcase-theme-preview-reloaded/includes/functions.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/showcase-theme-preview-reloaded/theme-showcase.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/showcase-theme-preview-reloaded/includes/class-theme-preview-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
6 plugin tags: theme preview, theme, showcase, demo, preview...

showcase-theme-preview-reloaded/theme-showcase.php 85% from 13 tests

The primary PHP file in "Showcase Theme Preview Reloaded" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("showcase-theme-preview-reloaded.php" instead of "theme-showcase.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 470 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected236 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45337205
JavaScript12031

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There were not PNG files found in your plugin