78% mybooking-templates-importer

Code Review | Mybooking Templates Importer

WordPress plugin Mybooking Templates Importer scored78%from 54 tests.

About plugin

  • Plugin page: mybooking-templat...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Sep 10, 2021
  • Latest release: Sep 10, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: juanmiqueo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /363 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.50MB] [CPU: ▼6.96ms] Passed 4 tests

Analyzing server-side resources used by Mybooking Templates Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1540.66 ▼6.26
Dashboard /wp-admin3.96 ▲0.6161.54 ▼6.20
Posts /wp-admin/edit.php4.01 ▲0.6556.58 ▲1.60
Add New Post /wp-admin/post-new.php6.48 ▲0.5890.13 ▼16.98
Media Library /wp-admin/upload.php3.88 ▲0.6542.45 ▲5.17
Mybooking Importer /wp-admin/themes.php?page=mybooking-templates-import3.9943.92

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Mybooking Templates Importer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.28 ▼0.451.94 ▲0.1242.79 ▼5.25
Dashboard /wp-admin2,199 ▲195.62 ▲0.0291.34 ▼4.4941.77 ▼1.71
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0339.12 ▲1.9935.49 ▼0.33
Add New Post /wp-admin/post-new.php1,529 ▲123.53 ▲0.39624.14 ▼57.1655.24 ▼0.85
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.0798.64 ▼16.2645.75 ▼3.08
Mybooking Importer /wp-admin/themes.php?page=mybooking-templates-import8871.9636.2340.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mybooking-templates-importer/mybooking-templates-importer.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'AwesomeMotive\\WPContentImporter2\\WPImporterLoggerCLI' not found in wp-content/plugins/mybooking-templates-importer/inc/Logger.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mybooking-templates-importer/views/plugin-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mybooking-templates-importer/inc/MyBookingTemplateSites.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'AwesomeMotive\\WPContentImporter2\\WPImporterLogger' not found in wp-content/plugins/mybooking-templates-importer/vendor/awesomemotive/wp-content-importer-v2/src/WPImporterLoggerCLI.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/mybooking-templates-importer/vendor/awesomemotive/wp-content-importer-v2/src/WXRImporter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AwesomeMotive\\WPContentImporter2\\WXRImporter' not found in wp-content/plugins/mybooking-templates-importer/vendor/awesomemotive/wp-content-importer-v2/src/Importer.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/mybooking-templates-importer/inc/CustomizerOption.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AwesomeMotive\\WPContentImporter2\\WXRImporter' not found in wp-content/plugins/mybooking-templates-importer/inc/WXRImporter.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/mybooking-templates-importer/inc/WPCLICommands.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
8 plugin tags: data, theme options, demo, redux, widgets...

mybooking-templates-importer/mybooking-templates-importer.php 92% from 13 tests

Analyzing the main PHP file in "Mybooking Templates Importer" version 1.0.0
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)

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 detected5,668 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,0761,9183,712
XML119421,310
CSS16711270
JavaScript15369197
JSON310120
Markdown330059

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.65
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods180
▷ Static methods3217.78%
▷ Public methods11865.56%
▷ Protected methods3720.56%
▷ Private methods2513.89%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/rent_standard_selector/preview.png131.99KB63.62KB▼ 51.80%