10% netbookings-shortcodes

Code Review | Netbookings Shortcodes

WordPress plugin Netbookings Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: netbookings-short...
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.1.1
  • WordPress version: 6.3.1
  • First release: Sep 20, 2018
  • Latest release: Dec 2, 2019
  • Number of updates: 18
  • Update frequency: every 24.4 days
  • Top authors: netbookings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/netbookings-shortcodes/general/netbookings-xml-data.php+47
    simplexml_load_file(): I/O warning : failed to load external entity "xml/package categories export.xml"

Server metrics [RAM: ▼1.81MB] [CPU: ▼53.50ms] Passed 4 tests

Server-side resources used by Netbookings Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.32 ▼33.90
Dashboard /wp-admin2.20 ▼1.107.15 ▼45.29
Posts /wp-admin/edit.php2.20 ▼1.168.65 ▼42.45
Add New Post /wp-admin/post-new.php2.20 ▼3.698.06 ▼92.35
Media Library /wp-admin/upload.php2.20 ▼1.037.36 ▼23.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Netbookings Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.25 ▼0.041.75 ▲0.1140.45 ▼0.76
Dashboard /wp-admin2,216 ▲425.55 ▼0.0588.43 ▼4.7064.39 ▲25.04
Posts /wp-admin/edit.php2,127 ▲271.97 ▼0.0439.46 ▼1.4435.23 ▼4.38
Add New Post /wp-admin/post-new.php1,565 ▲3918.24 ▼5.31760.15 ▲67.6758.64 ▲5.34
Media Library /wp-admin/upload.php1,421 ▲244.25 ▲0.08115.92 ▲8.7583.52 ▲38.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/netbookings-shortcodes/general/netbookings-xml-data.php+47
    simplexml_load_file(): I/O warning : failed to load external entity "xml/package categories export.xml"
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php
    • > /wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/packages.php
  • 44× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'SERVICES_NAME' of non-object in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 12
    • > PHP Notice
      Undefined variable: package in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/packages.php on line 22
    • > PHP Notice
      Trying to get property 'SERVICES_NAME' of non-object in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 15
    • > PHP Warning
      require_once(ABSPATHwp-includes/option.php): failed to open stream: No such file or directory in wp-content/plugins/netbookings-shortcodes/netbookings-shortcodes.php on line 11
    • > PHP Notice
      Trying to get property 'GROUPPACKAGES_GROUP' of non-object in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/packages.php on line 51
    • > PHP Notice
      Trying to get property 'SERVICES_IMAGE' of non-object in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 12
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 12
    • > PHP Notice
      Undefined variable: truncate in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 35
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 61
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/netbookings-shortcodes/package-service-cards/templates/services.php on line 43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Screenshot #3 (Present your bathing availability on your website.) image required
You can take inspiration from this readme.txt

netbookings-shortcodes/netbookings-shortcodes.php Passed 13 tests

The principal PHP file in "Netbookings Shortcodes" v. 2.0.4 is loaded by WordPress automatically on each request
68 characters long description:
Shortcodes for inserting Netbookings packages, services and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin15,717 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JSON20012,930
JavaScript9258456996
PHP9232197848
Sass61115657
CSS8463230
Markdown213040
YAML14916

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.86
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
general/assets/icon-128x128.png0.36KB0.13KB▼ 65.50%
general/assets/icon.png15.62KB0.87KB▼ 94.46%
general/assets/icon-256x256.png0.67KB0.15KB▼ 77.71%