84% invoices-camptix

Code Review | Camptix Invoices

WordPress plugin Camptix Invoices scored84%from 54 tests.

About plugin

  • Plugin page: invoices-camptix
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2018
  • Latest release: Jan 14, 2019
  • Number of updates: 8
  • Update frequency: every 44.4 days
  • Top authors: avillegasn (75%)willybahuaud (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.26ms] Passed 4 tests

Analyzing server-side resources used by Camptix Invoices
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.34 ▲2.03
Dashboard /wp-admin3.39 ▲0.0951.90 ▲2.64
Posts /wp-admin/edit.php3.44 ▲0.0948.40 ▼7.09
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.33 ▼8.33
Media Library /wp-admin/upload.php3.32 ▲0.0936.21 ▲0.35

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Camptix Invoices
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.191.99 ▲0.0543.70 ▲0.48
Dashboard /wp-admin2,206 ▲184.88 ▼0.93120.60 ▲11.0744.38 ▲2.07
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0036.48 ▼6.3933.53 ▼4.77
Add New Post /wp-admin/post-new.php1,533 ▼021.08 ▼2.06668.17 ▼26.4246.07 ▼17.19
Media Library /wp-admin/upload.php1,391 ▲64.28 ▲0.0399.98 ▼2.1343.62 ▲0.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'CampTix_Addon' not found in wp-content/plugins/invoices-camptix/includes/class-camptix-addon-invoices.php:15
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/invoices-camptix/includes/lib/fpdf/template.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
6 plugin tags: organizer, notes, event, tickets, invoice...

invoices-camptix/camptix-invoices.php 92% from 13 tests

The main PHP script in "Camptix Invoices" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("invoices-camptix.php" instead of "camptix-invoices.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,279 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP202215223,020
PO File16274158
JavaScript22369
CSS22032

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity143.33
▷ Minimum class complexity46.00
▷ Maximum class complexity338.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods122
▷ Static methods1713.93%
▷ Public methods8166.39%
▷ Protected methods3831.15%
▷ Private methods32.46%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin