79% wpmagplus-companion

Code Review | WPMagPlus Companion

WordPress plugin WPMagPlus Companion scored79%from 54 tests.

About plugin

  • Plugin page: wpmagplus-companion
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Aug 11, 2021
  • Number of updates: 10
  • Update frequency: every 34.9 days
  • Top authors: avidthemes (90%)wpmagplus (20%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /15,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.81ms] Passed 4 tests

This is a short check of server-side resources used by WPMagPlus Companion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.32 ▲0.53
Dashboard /wp-admin3.45 ▲0.1545.48 ▼7.31
Posts /wp-admin/edit.php3.56 ▲0.2152.51 ▲6.31
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.18 ▼15.45
Media Library /wp-admin/upload.php3.37 ▲0.1436.21 ▲3.01
Demo Import /wp-admin/themes.php?page=advanced-import3.3434.23

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

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

Browser metrics Passed 4 tests

WPMagPlus Companion: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲5213.24 ▼1.054.81 ▲2.8944.08 ▼0.68
Dashboard /wp-admin2,232 ▲444.86 ▼0.03113.57 ▲7.0842.50 ▲1.97
Posts /wp-admin/edit.php2,111 ▲222.03 ▲0.0035.35 ▲0.3935.15 ▲4.93
Add New Post /wp-admin/post-new.php1,545 ▲323.15 ▲4.77657.96 ▲10.1845.25 ▼6.42
Media Library /wp-admin/upload.php1,411 ▲234.25 ▲0.06101.99 ▲5.3142.74 ▼5.64
Demo Import /wp-admin/themes.php?page=advanced-import8152.2123.5030.83

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • __wpmagplus_companion_do_redirect

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpmagplus-companion/public/partials/wpmagplus-companion-public-display.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wpmagplus-companion/admin/demo-data-template/lifestyle-magazine-lite.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wpmagplus-companion/admin/demo-data-template/travel-magazine-lite.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wpmagplus-companion/admin/demo-data-template/wp-travel-magazine.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpmagplus-companion/admin/about/about.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wpmagplus-companion/admin/demo-data-template/wp-magazine-plus.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'WPMAGPLUS_COMPANION_PATHadmin/about/about.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpmagplus-companion/admin/functions.php on line 3
    • > PHP Warning
      Use of undefined constant WPMAGPLUS_COMPANION_PATH - assumed 'WPMAGPLUS_COMPANION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpmagplus-companion/admin/functions.php on line 3
    • > PHP Warning
      require_once(WPMAGPLUS_COMPANION_PATHadmin/about/about.php): failed to open stream: No such file or directory in wp-content/plugins/wpmagplus-companion/admin/functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpmagplus-companion/admin/demo-documentation.php:81

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: advanced import, demo import

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

The main PHP file in "WPMagPlus Companion" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
This is a theme import plugin. Our plugin will help you import the theme content with just a click.

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
No dangerous file extensions were detected2,570 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP183715582,337
CSS31216120
JSON870087
JavaScript273226

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.38
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods515.62%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/about/images/logo.png28.01KB9.41KB▼ 66.40%