84% speed-bumps

Code Review | Speed Bumps

WordPress plugin Speed Bumps scored 84% from 54 tests.

About plugin

  • Plugin page: speed-bumps
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Dec 17, 2016
  • Number of updates: 7
  • Update frequency: every 73.3 days
  • Top authors: goldenapples (71.43%)danielbachhuber (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,265 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
Installer ran successfully

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

An overview of server-side resources used by Speed Bumps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.32 ▼7.55
Dashboard /wp-admin3.35 ▲0.0545.88 ▼1.98
Posts /wp-admin/edit.php3.46 ▲0.1151.11 ▲4.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.42 ▼3.01
Media Library /wp-admin/upload.php3.27 ▲0.0436.77 ▲0.52

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Speed Bumps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.161.79 ▼0.0247.06 ▲5.09
Dashboard /wp-admin2,209 ▲244.85 ▼0.05108.15 ▲1.9639.66 ▼5.68
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0240.00 ▼1.0140.37 ▲2.63
Add New Post /wp-admin/post-new.php1,533 ▼923.61 ▲5.54607.94 ▼39.8052.34 ▼0.65
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.0999.54 ▼3.9442.63 ▲0.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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 fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-blockquote.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-oembed.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-iframe.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-header.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-dummy.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Speed_Bumps\\Constraints\\Elements\\Constraint_Abstract' not found in wp-content/plugins/speed-bumps/inc/constraints/elements/class-image.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/speed-bumps/speed-bumps.php:462

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
3 plugin tags: recirculation, content, advertising

speed-bumps/speed-bumps.php Passed 13 tests

The main file in "Speed Bumps" v. 0.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
52 characters long description:
A Plugin to insert a piece of content intelligently.

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
No dangerous file extensions were detected707 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP15184305593
Markdown147079
JavaScript193223
JSON10012

PHP code Passed 2 tests

An overview 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.46
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods50
▷ Static methods2958.00%
▷ Public methods4692.00%
▷ Protected methods12.00%
▷ Private methods36.00%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin