73% travel-company-helper

Code Review | Travel Company Helper

WordPress plugin Travel Company Helper scored73%from 54 tests.

About plugin

  • Plugin page: travel-company-he...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Sep 4, 2018
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: scorpionthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /5,001 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼6.20ms] Passed 4 tests

A check of server-side resources used by Travel Company Helper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.92 ▼0.41
Dashboard /wp-admin3.46 ▲0.1146.97 ▼20.83
Posts /wp-admin/edit.php3.51 ▲0.1550.87 ▲4.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1595.40 ▼1.13
Media Library /wp-admin/upload.php3.38 ▲0.1533.78 ▼2.43
Category /wp-admin/edit-tags.php?taxonomy=service_categories&post_type=service3.3734.13
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=service3.3733.97
Services /wp-admin/edit.php?post_type=service3.4236.03
Add New /wp-admin/post-new.php?post_type=service3.5054.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Travel Company Helper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲11913.56 ▼0.822.02 ▲0.1344.30 ▼0.92
Dashboard /wp-admin2,243 ▲525.83 ▲0.91101.24 ▼5.0839.42 ▼6.85
Posts /wp-admin/edit.php2,123 ▲342.06 ▲0.0640.84 ▲4.9835.82 ▲0.07
Add New Post /wp-admin/post-new.php1,559 ▲4523.36 ▲5.87614.57 ▼66.0361.90 ▲7.68
Media Library /wp-admin/upload.php1,428 ▲464.21 ▼0.0395.91 ▼12.7644.58 ▼0.58
Category /wp-admin/edit-tags.php?taxonomy=service_categories&post_type=service1,2992.1426.7128.09
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=service1,3412.1426.7929.68
Services /wp-admin/edit.php?post_type=service1,1041.9630.7728.17
Add New /wp-admin/post-new.php?post_type=service2,4157.79169.7864.77

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/travel-company-helper/travel-company-helper.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-company-helper/metabox/travel-company-service-meta-boxes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-company-helper/custom-post-types.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-company-helper/inc/RepeaterController.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-company-helper/travel-company-helper-function.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=service
    • > Network (severe)
    wp-content/plugins/assets/css/meta-box.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

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
1 plugin tags: themes

travel-company-helper/travel-company-helper.php Passed 13 tests

The main PHP script in "Travel Company Helper" version 1.0.5 is automatically included on every request by WordPress
81 characters long description:
Used for Travel Company theme for frontpage section and custom post type service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,328 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP122783021,311
CSS11017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.75
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity5.23
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected