72% dreamgrow-scroll-triggered-box

Code Review | Scroll Triggered Box

WordPress plugin Scroll Triggered Box scored72%from 54 tests.

About plugin

  • Plugin page: dreamgrow-scroll-...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2012
  • Latest release: Dec 13, 2022
  • Number of updates: 181
  • Update frequency: every 21.2 days
  • Top authors: Eero Hermlin (51.93%)pk2000 (45.86%)grimmdude (3.31%)

Code review

54 tests

User reviews

60 reviews

Install metrics

2,000+ active /120,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼7.88ms] Passed 4 tests

A check of server-side resources used by Scroll Triggered Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.61 ▲2.70
Dashboard /wp-admin3.59 ▲0.2548.19 ▼20.82
Posts /wp-admin/edit.php3.71 ▲0.3553.22 ▲3.24
Add New Post /wp-admin/post-new.php6.19 ▲0.3199.75 ▼6.77
Media Library /wp-admin/upload.php3.52 ▲0.2935.81 ▼6.61
Add New Scrollbox /wp-admin/post-new.php?post_type=dgd_scrollbox3.6745.85
All Scrollboxes /wp-admin/edit.php?post_type=dgd_scrollbox3.5638.15

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
stb_version
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Scroll Triggered Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,987 ▲24114.26 ▼0.496.94 ▲5.1442.65 ▼2.50
Dashboard /wp-admin2,264 ▲765.44 ▲0.56109.29 ▼8.9742.11 ▼1.50
Posts /wp-admin/edit.php2,164 ▲752.37 ▲0.3842.46 ▲5.6441.64 ▲9.94
Add New Post /wp-admin/post-new.php1,568 ▲3523.64 ▲0.57680.90 ▼78.5936.25 ▼26.10
Media Library /wp-admin/upload.php1,455 ▲674.67 ▲0.49108.36 ▼8.6442.35 ▼9.69
Add New Scrollbox /wp-admin/post-new.php?post_type=dgd_scrollbox4,7818.40243.64165.28
All Scrollboxes /wp-admin/edit.php?post_type=dgd_scrollbox1,1252.5739.8427.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • stb_version
    • widget_theysaidso_widget
    • can_compress_scripts

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
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=dgd_scrollbox
    • > Notice in wp-includes/general-template.php+5153
    Array to string conversion

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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dreamgrow-scroll-triggered-box/dgd-scrollbox-admin.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_page' not found in wp-content/plugins/dreamgrow-scroll-triggered-box/dgd-page-selector-walker.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dreamgrow-scroll-triggered-box/dgd-scrollbox.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=dgd_scrollbox
    • > Network (severe)
    https://www.dreamgrow.com/wp-content/plugins/lazy-load/images/1x1.trans.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: blur, subscription pop-up, page overlay, call to action, lightbox...

dreamgrow-scroll-triggered-box/dgd-scrollbox.php 92% from 13 tests

"Scroll Triggered Box" version 2.3'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: It is recommended to name the main PHP file as the plugin slug ("dreamgrow-scroll-triggered-box.php" instead of "dgd-scrollbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,074 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP42181231,460
JavaScript4134871,014
CSS1216220589
XML1006
SVG1005

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.40
Average class complexity43.00
▷ Minimum class complexity4.00
▷ Maximum class complexity85.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1124.44%
▷ Public methods3884.44%
▷ Protected methods00.00%
▷ Private methods715.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/default/bullet.png1.02KB0.25KB▼ 75.88%
themes/grass_green/bullet.png0.58KB0.49KB▼ 15.29%
img/close.png1.28KB1.35KB0.00%
templates/clean_white/bullet.png0.69KB0.68KB▼ 0.85%
templates/default/bullet.png1.02KB0.25KB▼ 75.88%