73% drop-shadow-boxes

Code Review | Drop Shadow Boxes

WordPress plugin Drop Shadow Boxes scored73%from 54 tests.

About plugin

  • Plugin page: drop-shadow-boxes
  • Plugin version: 1.7.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2012
  • Latest release: Nov 20, 2023
  • Number of updates: 144
  • Update frequency: every 28.8 days
  • Top authors: stevehenty (100%)

Code review

54 tests

User reviews

77 reviews

Install metrics

6,000+ active /178,099 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.03MB] [CPU: ▼92.81ms] 75% from 4 tests

Analyzing server-side resources used by Drop Shadow Boxes
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.03MB on /wp-admin/admin.php?page=drop-shadow-boxes)
PageMemory (MB)CPU Time (ms)
Home /8.94 ▲5.4762.72 ▲23.05
Dashboard /wp-admin8.96 ▲5.5768.75 ▼437.44
Posts /wp-admin/edit.php8.96 ▲5.6077.81 ▲32.44
Add New Post /wp-admin/post-new.php9.37 ▲3.48109.58 ▲11.58
Media Library /wp-admin/upload.php8.96 ▲5.7365.39 ▲31.56
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9663.67
Drop Shadow Boxes /wp-admin/admin.php?page=drop-shadow-boxes8.9661.99

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 200 new files
Database: no new tables, 10 new options
New WordPress options
widget_dropshadowboxes_widget
fs_accounts
widget_recent-comments
db_upgraded
fs_debug_mode
fs_active_plugins
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Drop Shadow Boxes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5514.22 ▼0.131.48 ▼0.1628.89 ▼13.72
Dashboard /wp-admin2,209 ▲75.56 ▼0.19109.42 ▲14.2449.63 ▲5.98
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0540.91 ▲4.8341.82 ▲3.40
Add New Post /wp-admin/post-new.php1,903 ▲37721.21 ▼1.85636.18 ▲8.2434.88 ▼9.50
Media Library /wp-admin/upload.php1,417 ▲174.23 ▼0.0597.87 ▼11.8744.76 ▼1.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0721.7332.4827.45
Drop Shadow Boxes /wp-admin/admin.php?page=drop-shadow-boxes9741.7231.6855.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/drop-shadow-boxes/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-posts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • fs_accounts
    • widget_dropshadowboxes_widget

Smoke tests 75% 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 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drop-shadow-boxes/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: gutenberg, raised, curl, perspective, drop shadow...

drop-shadow-boxes/dropshadowboxes.php 85% from 13 tests

"Drop Shadow Boxes" version 1.7.14's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("drop-shadow-boxes.php" instead of "dropshadowboxes.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 181 characters long)

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin35,705 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228,15317,37734,109
JavaScript65795516
Sass2371342
CSS153419307
Markdown1680214
PO File2193344190
JSON10027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity91.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,275
▷ Static methods20916.39%
▷ Public methods88669.49%
▷ Protected methods171.33%
▷ Private methods37229.18%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/box-button.png0.14KB0.11KB▼ 25.85%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/drop-shadow-boxes.png9.16KB5.26KB▼ 42.58%