78% wp-sitebuilder

Code Review | WP Sitebuilder

WordPress plugin WP Sitebuilder scored78%from 54 tests.

About plugin

  • Plugin page: wp-sitebuilder
  • Plugin version: 0.0.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 30
  • Update frequency: every 1.9 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.23MB] [CPU: ▼17.07ms] Passed 4 tests

Server-side resources used by WP Sitebuilder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4838.67 ▼5.13
Dashboard /wp-admin3.79 ▲0.4847.36 ▲0.75
Posts /wp-admin/edit.php3.84 ▲0.4849.07 ▲1.73
Add New Post /wp-admin/post-new.php3.57 ▼2.3241.21 ▼65.61
Media Library /wp-admin/upload.php3.65 ▲0.4238.61 ▲4.45
WP Sitebuilder /wp-admin/admin.php?page=wpsb-menu3.6335.42
Role Manager /wp-admin/admin.php?page=sbrm_role_mananger3.6335.78
Get Mote Features /wp-admin/admin.php?page=wpsb_add_ons3.6134.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Sitebuilder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.24 ▼1.061.58 ▼0.1439.39 ▼0.79
Dashboard /wp-admin2,260 ▲754.86 ▼0.99112.86 ▲7.0844.85 ▲0.88
Posts /wp-admin/edit.php2,140 ▲512.02 ▲0.0241.38 ▼1.1036.83 ▲0.99
Add New Post /wp-admin/post-new.php9,378 ▲7,86423.31 ▲5.74888.02 ▲240.0739.17 ▼10.72
Media Library /wp-admin/upload.php1,439 ▲574.22 ▼0.0397.90 ▼2.3943.69 ▲1.68
WP Sitebuilder /wp-admin/admin.php?page=wpsb-menu1,5622.5441.9429.92
Role Manager /wp-admin/admin.php?page=sbrm_role_mananger2,5563.2051.7441.89
Get Mote Features /wp-admin/admin.php?page=wpsb_add_ons7952.0527.7326.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 8× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-sitebuilder/widgets/card.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/notice.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/tabs.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/modal.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/accordion.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/alert.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/chip.widget.php
    • > /wp-content/plugins/wp-sitebuilder/widgets/vue.widgets.php
  • 19× 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 language_attributes() in wp-content/plugins/wp-sitebuilder/includes/admin/preview.php:9
    • > PHP Warning
      Use of undefined constant WPSB_ROOT - assumed 'WPSB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-sitebuilder/modules/role-manager/admin/role-manager-panel.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/wp-sitebuilder/templates/post/content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-sitebuilder/includes/content.php:6
    • > PHP Warning
      include_once(WPSB_ROOT/components/element-components.php): failed to open stream: No such file or directory in wp-content/plugins/wp-sitebuilder/modules/role-manager/admin/role-manager-panel.php on line 1
    • > PHP Warning
      include_once(WPSB_ROOT/components/element-components.php): failed to open stream: No such file or directory in wp-content/plugins/wp-sitebuilder/includes/admin/wpsb-settings-panel.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-sitebuilder/add-on.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sitebuilder/components/element-components.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-sitebuilder/includes/ajax-actions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sitebuilder/templates/post/content-none.php:13

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 103 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

wp-sitebuilder/wp-sitebuilder.php 92% from 13 tests

"WP Sitebuilder" version 0.0.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin26,138 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
CSS1431617,797
LESS516157,082
JavaScript91,1643,1956,893
PHP403822883,368
SVG200973
Markdown112025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods77
▷ Static methods810.39%
▷ Public methods7698.70%
▷ Protected methods11.30%
▷ Private methods00.00%
Functions33
▷ Named functions1648.48%
▷ Anonymous functions1751.52%
Constants3
▷ Global constants3100.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
10 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpsb-two_third.png0.20KB0.13KB▼ 37.80%
assets/images/wpsb-five_sixth.png0.21KB0.13KB▼ 35.98%
assets/images/wpsb-half.png0.20KB0.13KB▼ 35.64%
assets/images/wpsb-third.png0.21KB0.13KB▼ 39.53%
assets/images/wpsb-fifth.png0.20KB0.13KB▼ 37.50%