84% tattoo-shop-manager

Code Review | Tattoo Shop Manager

WordPress plugin Tattoo Shop Manager scored84%from 54 tests.

About plugin

  • Plugin page: tattoo-shop-manager
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2017
  • Latest release: Aug 11, 2017
  • Number of updates: 14
  • Update frequency: every 2.7 days
  • Top authors: xkon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,234 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.14ms] Passed 4 tests

This is a short check of server-side resources used by Tattoo Shop Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.05 ▼6.06
Dashboard /wp-admin3.31 ▲0.0043.33 ▼2.48
Posts /wp-admin/edit.php3.36 ▲0.0047.84 ▼2.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.29 ▼21.03
Media Library /wp-admin/upload.php3.23 ▲0.0035.02 ▲2.09

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

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

Browser metrics Passed 4 tests

Tattoo Shop Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.391.61 ▼0.1643.29 ▲3.02
Dashboard /wp-admin2,206 ▲185.91 ▲1.03108.80 ▼2.8341.13 ▲1.26
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0139.74 ▼1.3036.83 ▲2.26
Add New Post /wp-admin/post-new.php1,539 ▲623.29 ▲0.08681.16 ▲65.0470.87 ▲10.52
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0195.93 ▼4.1339.48 ▼4.26

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/employees.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/inks.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/suppliers.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/luckydraw.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/clients.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/revenues.php:125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/appointments.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tattoo-shop-manager/inc/needles.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tattoo-shop-manager/inc/shortcodes_widgets.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: piercing, manager, appointments, stock, clients...

tattoo-shop-manager/tattoo-shop-manager.php Passed 13 tests

This is the main PHP file of "Tattoo Shop Manager" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
42 characters long description:
A simple yet powerful Tattoo Shop Manager.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected9,809 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS11252026,861
PHP112771632,227
PO File1291315628
JavaScript215293

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.50
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin