78% wp-scriptcase

Code Review | WP Scriptcase

WordPress plugin WP Scriptcase scored78%from 54 tests.

About plugin

  • Plugin page: wp-scriptcase
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2013
  • Latest release: Jul 20, 2013
  • Number of updates: 16
  • Update frequency: every 1.0 days
  • Top authors: softmus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,817 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WP Scriptcase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.69 ▼1.58
Dashboard /wp-admin3.31 ▲0.0145.61 ▼3.99
Posts /wp-admin/edit.php3.37 ▲0.0144.98 ▲0.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.11 ▲1.60
Media Library /wp-admin/upload.php3.24 ▲0.0134.39 ▲1.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Scriptcase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.44 ▲0.061.78 ▼0.7343.21 ▼2.65
Dashboard /wp-admin2,203 ▲155.82 ▲0.9594.33 ▼14.7938.45 ▼10.98
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0239.25 ▲0.2934.82 ▲0.63
Add New Post /wp-admin/post-new.php1,542 ▲918.29 ▼4.90601.57 ▼77.0149.05 ▼6.74
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0595.77 ▼6.0940.58 ▼2.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-scriptcase/wpscriptcase_popup.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-scriptcase/wpscriptcase.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-scriptcase/wpscriptcase.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: wp scriptcase, scriptcase, scriptcase plugin

wp-scriptcase/wpscriptcase.php 85% from 13 tests

The main file in "WP Scriptcase" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 283 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-scriptcase.php" instead of "wpscriptcase.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin126 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2323594
JavaScript14427
CSS1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/banner_wp-scriptcase.png3.64KB3.33KB▼ 8.42%
includes/images/wpscriptcase.png0.55KB0.44KB▼ 20.35%