77% constructor-for-siteorigin

Code Review | Constructor for SiteOrigin

WordPress plugin Constructor for SiteOrigin scored77%from 54 tests.

About plugin

  • Plugin page: constructor-for-s...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Nov 25, 2017
  • Number of updates: 14
  • Update frequency: every 20.9 days
  • Top authors: mimothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /18,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.26ms] Passed 4 tests

An overview of server-side resources used by Constructor for SiteOrigin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.84 ▲4.38
Dashboard /wp-admin3.40 ▲0.0944.97 ▼4.99
Posts /wp-admin/edit.php3.51 ▲0.1549.02 ▼0.55
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.87 ▼26.23
Media Library /wp-admin/upload.php3.32 ▲0.0932.11 ▼1.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_constructor-siteorigin-panels-post-content
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Constructor for SiteOrigin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.91 ▼0.488.07 ▲6.4044.41 ▼5.07
Dashboard /wp-admin2,213 ▲245.83 ▼0.08106.66 ▼7.6439.53 ▼0.91
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0041.67 ▼13.0334.67 ▼4.56
Add New Post /wp-admin/post-new.php1,518 ▼223.09 ▼0.11648.98 ▲49.0563.03 ▲15.94
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.03109.42 ▲14.5745.18 ▲3.62

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_constructor-siteorigin-panels-post-content
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/constructor-for-siteorigin/public/partials/constructor-siteorigin-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/constructor-for-siteorigin/includes/class-constructor-siteorigin-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === constructor-for-siteorigin === )
  • Screenshots: A description for screenshot #1 is missing in constructor-for-siteorigin/assets to your readme.txt
The official readme.txt might help

constructor-for-siteorigin/constructor-siteorigin.php 85% from 13 tests

"Constructor for SiteOrigin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("constructor-for-siteorigin.php" instead of "constructor-siteorigin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; 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
Good job! No executable or dangerous file extensions detected321 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14130482315
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected