78% blaize-companion

Code Review | Blaize Companion

WordPress plugin Blaize Companion scored78%from 54 tests.

About plugin

  • Plugin page: blaize-companion
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.6
  • WordPress version: 6.3.1
  • First release: May 16, 2018
  • Latest release: Aug 26, 2018
  • Number of updates: 8
  • Update frequency: every 12.9 days
  • Top authors: bnayawpguy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.55MB] [CPU: ▼0.25ms] Passed 4 tests

An overview of server-side resources used by Blaize Companion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5541.97 ▼3.35
Dashboard /wp-admin3.85 ▲0.5556.49 ▲3.75
Posts /wp-admin/edit.php3.96 ▲0.6155.65 ▲0.94
Add New Post /wp-admin/post-new.php6.45 ▲0.5699.34 ▼2.32
Media Library /wp-admin/upload.php3.77 ▲0.5540.99 ▲4.75
All Testimonials /wp-admin/edit.php?post_type=testimonial3.8241.89
Add New /wp-admin/post-new.php?post_type=team3.9052.11
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio3.7759.83
Add New /wp-admin/post-new.php?post_type=portfolio3.9155.18
Add New /wp-admin/post-new.php?post_type=testimonial3.9054.23
All Items /wp-admin/edit.php?post_type=portfolio3.8237.26
All Teams /wp-admin/edit.php?post_type=team3.8235.66

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Blaize Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲15013.15 ▼1.221.73 ▼0.3843.12 ▼0.59
Dashboard /wp-admin2,290 ▲1025.81 ▼0.0795.42 ▼5.9541.69 ▼1.03
Posts /wp-admin/edit.php2,176 ▲872.00 ▼0.0539.24 ▼0.7034.38 ▼5.10
Add New Post /wp-admin/post-new.php1,588 ▲7423.39 ▲5.85667.55 ▼33.1155.06 ▼5.52
Media Library /wp-admin/upload.php1,472 ▲814.19 ▼0.03100.28 ▼3.3048.60 ▲4.33
All Testimonials /wp-admin/edit.php?post_type=testimonial1,1402.0031.1329.64
Add New /wp-admin/post-new.php?post_type=team2,3297.71171.4266.47
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio1,3492.1430.8036.19
Add New /wp-admin/post-new.php?post_type=portfolio2,3357.59167.3555.66
Add New /wp-admin/post-new.php?post_type=testimonial2,2847.71165.8757.89
All Items /wp-admin/edit.php?post_type=portfolio1,1571.9530.7931.19
All Teams /wp-admin/edit.php?post_type=team1,1401.9930.2627.81

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/blaize-companion/blaize-companion.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant BLAIZE_COMPANION_PATH - assumed 'BLAIZE_COMPANION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/blaize-companion/customizer/customizer-tabs/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/blaize-companion/post-types/team-post-type.php:3
    • > PHP Warning
      require(BLAIZE_COMPANION_PATHcustomizer/customizer-tabs/tab-class.php): failed to open stream: No such file or directory in wp-content/plugins/blaize-companion/customizer/customizer-tabs/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blaize-companion/customizer/customizer-tabs/customizer.php:347
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/blaize-companion/post-types/portfolio-post-type.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blaize-companion/customizer/customizer.php:5
    • > PHP Fatal error
      require(): Failed opening required 'BLAIZE_COMPANION_PATHcustomizer/customizer-tabs/tab-class.php' (include_path='.:/usr/share/php') in wp-content/plugins/blaize-companion/customizer/customizer-tabs/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/blaize-companion/post-types/testimonial-post-type.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blaize-companion/customizer/blaize-customizer.php:19

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: custom post type, customizer options

blaize-companion/blaize-companion.php 92% from 13 tests

The main file in "Blaize Companion" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin15,656 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS183,077787,686
SVG4005,141
PHP124004552,542
JavaScript37753287

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.11
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2485.71%
▷ Protected methods310.71%
▷ Private methods13.57%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
customizer/assets/images/header1.png5.16KB2.59KB▼ 49.70%
customizer/assets/images/header2.png5.28KB2.61KB▼ 50.55%
customizer/assets/images/green.png0.93KB0.08KB▼ 90.99%
customizer/assets/images/deep-orange.png0.93KB0.08KB▼ 90.99%
customizer/assets/images/teal.png0.93KB0.08KB▼ 90.99%