98% travel-pictures-monetization

Code Review | Hatlas Vision - Improve your Travel Pictures Automatically

WordPress plugin Hatlas Vision - Improve your Travel Pictures Automatically scored 98% from 54 tests.

About plugin

  • Plugin page: travel-pictures-m...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.6
  • WordPress version: 5.8.1
  • First release: Jul 5, 2020
  • Latest release: Jun 26, 2021
  • Number of updates: 28
  • Update frequency: every 12.8 days
  • Top authors: hatlastravel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 397 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼143.97ms] Passed 4 tests

An overview of server-side resources used by Hatlas Vision - Improve your Travel Pictures Automatically
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1538.62 ▲16.54
Dashboard /wp-admin3.09 ▲0.0445.32 ▼0.88
Posts /wp-admin/edit.php3.14 ▲0.0445.00 ▼1.74
Add New Post /wp-admin/post-new.php5.45 ▲0.0287.09 ▼573.14
Media Library /wp-admin/upload.php3.03 ▲0.0333.55 ▼0.12
Hatlas Travel /wp-admin/options-general.php?page=hatlas-travel3.0429.71

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Hatlas Vision - Improve your Travel Pictures Automatically
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,924 ▲31817.55 ▲2.0454.66 ▲44.2747.72 ▲2.95
Dashboard /wp-admin2,975 ▲415.86 ▼0.11140.68 ▼10.51102.35 ▼11.65
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0080.81 ▲13.5687.60 ▲3.35
Add New Post /wp-admin/post-new.php1,679 ▼418.90 ▲0.12418.07 ▲2.54115.16 ▲9.60
Media Library /wp-admin/upload.php1,815 ▲85.01 ▼0.02152.90 ▼1.83127.18 ▲15.51
Hatlas Travel /wp-admin/options-general.php?page=hatlas-travel1,2552.2355.0373.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #0, #0, #0, #0 in travel-pictures-monetization/assets to your readme.txt
You can look at the official readme.txt

travel-pictures-monetization/hatlas-travel.php 69% from 13 tests

This is the main PHP file of "Hatlas Vision - Improve your Travel Pictures Automatically" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 330 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("travel-pictures-monetization.php" instead of "hatlas-travel.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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 detected710 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript116056431
PHP23721189
CSS111190

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods654.55%
▷ Protected methods00.00%
▷ Private methods545.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected