94% mystical-companion

Code Review | Mystical Companion

WordPress plugin Mystical Companion scored 94% from 54 tests.

About plugin

  • Plugin page: mystical-companion
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 5.8.1
  • First release: Aug 8, 2019
  • Latest release: Nov 17, 2019
  • Number of updates: 3
  • Update frequency: every 34.0 days
  • Top authors: bnayawpguy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 925 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.31ms] Passed 4 tests

A check of server-side resources used by Mystical Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1737.43 ▲13.87
Dashboard /wp-admin3.11 ▲0.0551.95 ▼2.25
Posts /wp-admin/edit.php3.17 ▲0.0545.18 ▲5.22
Add New Post /wp-admin/post-new.php5.48 ▲0.0494.38 ▼568.24
Media Library /wp-admin/upload.php3.06 ▲0.0535.59 ▲0.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mystical Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12915.82 ▼0.159.25 ▲1.2851.05 ▼4.91
Dashboard /wp-admin2,992 ▲585.91 ▼0.03139.18 ▼7.40117.77 ▲2.59
Posts /wp-admin/edit.php2,762 ▲232.70 ▲0.0173.86 ▲3.43101.64 ▲4.95
Add New Post /wp-admin/post-new.php1,637 ▲3321.29 ▲2.47287.23 ▼88.13112.34 ▼11.68
Media Library /wp-admin/upload.php1,833 ▲235.03 ▲0.01155.91 ▲4.70130.55 ▲4.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mystical-companion/widgets/mystical-blogs-carousel-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mystical-companion/widgets/mystical-counter-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mystical-companion/widgets/mystical-rooms-carousel-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mystical-companion/widgets/mystical-testimonial-carousel-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Control_Icon' not found in wp-content/plugins/mystical-companion/controls/mystical-icons-control.php:11

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: metabox, editor, elementor

mystical-companion/mystical-companion.php Passed 13 tests

The main PHP file in "Mystical Companion" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
A companion plugin for themes by MysticalThemes.

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
No dangerous file extensions were detected6,700 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS6121402,234
JavaScript34949622,012
PHP73372391,962
SVG100492

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.33
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods58
▷ Static methods23.45%
▷ Public methods4577.59%
▷ Protected methods1322.41%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendors/owl-carousel/owl.video.play.png4.86KB2.74KB▼ 43.61%