84% shortbuild

Code Review | ShortBuild

WordPress plugin ShortBuild scored84%from 54 tests.

About plugin

  • Plugin page: shortbuild
  • Plugin version: 1.6.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2019
  • Latest release: Aug 11, 2023
  • Number of updates: 21
  • Update frequency: every 77.9 days
  • Top authors: managethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /42,972 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.07MB] [CPU: ▼5.44ms] Passed 4 tests

This is a short check of server-side resources used by ShortBuild
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.71 ▲1.47
Dashboard /wp-admin3.37 ▲0.0744.35 ▼4.41
Posts /wp-admin/edit.php3.48 ▲0.1347.57 ▼0.58
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.20 ▼14.23
Media Library /wp-admin/upload.php3.29 ▲0.0734.67 ▼2.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ShortBuild
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.34 ▼1.041.64 ▼0.0741.32 ▼1.85
Dashboard /wp-admin2,211 ▲205.85 ▲0.9596.84 ▼1.9438.79 ▼3.64
Posts /wp-admin/edit.php2,091 ▲22.05 ▲0.0538.77 ▼3.1333.47 ▼2.69
Add New Post /wp-admin/post-new.php1,516 ▼2823.24 ▲4.69646.40 ▼11.7053.12 ▼7.96
Media Library /wp-admin/upload.php1,387 ▲24.19 ▼0.05101.71 ▼1.7943.13 ▼4.25

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/bagility/pages/blog.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/short/pages/contact.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/short/pages/about.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/short/pages/home.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/bagility/pages/about.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/shortbuild/inc/newses/widgets/featured-post-widget.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/shortbuild/inc/bagility/pages/home.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/shortbuild/shortbuild.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Newses_Widget_Base' not found in wp-content/plugins/shortbuild/inc/newses/widgets/widget-posts-slider.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/shortbuild/inc/short/sections/homepage.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: projects, callout, testimonial, demo, home page...

shortbuild/shortbuild.php Passed 13 tests

"ShortBuild" version 1.6.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
53 characters long description:
Shortbuild plugin is comptible for Themeansar themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,837 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,0676474,700
CSS25845581
JavaScript24735304
JSON600252

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.38
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods5396.36%
▷ Protected methods00.00%
▷ Private methods23.64%
Functions124
▷ Named functions124100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 1.10MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/busimax.png280.61KB302.92KB0.00%
inc/images/businessup-lite.png253.03KB256.39KB0.00%
inc/images/bugency.png254.81KB259.85KB0.00%
inc/images/awesome-business.png333.31KB338.15KB0.00%