84% mantrabrain-starter-sites

Code Review | MantraBrain Starter Sites | MantraBrain Theme Demo Importer

WordPress plugin MantraBrain Starter Sites | MantraBrain Theme Demo Importer scored84%from 54 tests.

About plugin

  • Plugin page: mantrabrain-start...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Jul 22, 2023
  • Number of updates: 28
  • Update frequency: every 58.2 days
  • Top authors: mantrabrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /50,692 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.23ms] Passed 4 tests

An overview of server-side resources used by MantraBrain Starter Sites | MantraBrain Theme Demo Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.96 ▼4.55
Dashboard /wp-admin3.37 ▲0.0745.14 ▼0.15
Posts /wp-admin/edit.php3.49 ▲0.1349.78 ▲5.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.73 ▲3.54
Media Library /wp-admin/upload.php3.30 ▲0.0734.68 ▲2.10

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

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

Browser metrics Passed 4 tests

MantraBrain Starter Sites | MantraBrain Theme Demo Importer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.36 ▼1.011.72 ▼0.0646.30 ▲4.35
Dashboard /wp-admin2,223 ▲324.86 ▼1.04108.61 ▲4.5942.03 ▲1.31
Posts /wp-admin/edit.php2,105 ▲191.99 ▼0.0240.27 ▲5.1936.43 ▲0.29
Add New Post /wp-admin/post-new.php1,526 ▲617.76 ▼5.13663.31 ▼2.9862.55 ▲8.96
Media Library /wp-admin/upload.php1,405 ▲144.25 ▲0.05110.66 ▲11.4245.34 ▼3.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/mantrabrain-starter-sites/includes/importers/customize/class-oc-customize-demo-importer-setting.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mantrabrain-starter-sites/includes/admin/dashboard/class-mantrabrain-admin-dashboard.php:122

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)
No browser issues were found

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: demo import, mantrabrain, starter sites

mantrabrain-starter-sites/mantrabrain-starter-sites.php Passed 13 tests

The main PHP file in "MantraBrain Starter Sites | MantraBrain Theme Demo Importer" ver. 1.1.6 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Starter sites / Demo importer for Mantra Brain Themes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,968 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript88545503,245
PHP158359233,167
CSS37411,556

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity46.77
▷ Minimum class complexity1.00
▷ Maximum class complexity194.00
Average method complexity6.41
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes215.38%
Methods110
▷ Static methods1311.82%
▷ Public methods9889.09%
▷ Protected methods10.91%
▷ Private methods1110.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
No PNG files were detected