68% rcp-taxamo

Code Review | Restrict Content Pro - Taxamo Integration

WordPress plugin Restrict Content Pro - Taxamo Integration scored68%from 54 tests.

About plugin

  • Plugin page: rcp-taxamo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Jan 7, 2015
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: danieliser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /879 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.00MB] [CPU: ▼1.41ms] Passed 4 tests

This is a short check of server-side resources used by Restrict Content Pro - Taxamo Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.80 ▼5.32
Dashboard /wp-admin3.31 ▲0.0143.63 ▼1.15
Posts /wp-admin/edit.php3.36 ▲0.0046.48 ▲2.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.38 ▼1.79
Media Library /wp-admin/upload.php3.23 ▲0.0038.42 ▲5.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restrict Content Pro - Taxamo Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.71 ▼0.1242.57 ▼2.20
Dashboard /wp-admin2,209 ▲175.84 ▲0.9195.42 ▼27.1342.65 ▼0.99
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0140.77 ▲5.7335.00 ▲2.91
Add New Post /wp-admin/post-new.php1,535 ▼723.24 ▲4.76685.19 ▲19.2750.38 ▼4.29
Media Library /wp-admin/upload.php1,385 ▼04.21 ▼0.01123.50 ▲18.2144.15 ▼0.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/test/TaxamoTest.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'TaxamoTestCase' not found in wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/test/TaxamoTest/TestTaxApi.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'UnitTestCase' not found in wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/test/TaxamoTest/Common.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TaxamoTestCase' not found in wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/test/TaxamoTest/TestTransactionsApi.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TaxamoTestCase' not found in wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/test/TaxamoTest/TestExceptionSystem.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rcp-taxamo/rcp-taxamo.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: restrict content pro, taxamo, vat taxes

rcp-taxamo/rcp-taxamo.php Passed 13 tests

The main PHP script in "Restrict Content Pro - Taxamo Integration" version 1.0.0 is automatically included on every request by WordPress
83 characters long description:
Integrate Restrict Content Pro with Taxamo service for VAT storage and calculation.

Code Analysis 5% from 3 tests

File types 0% from 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
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/rcp-taxamo/includes/libraries/taxamo-php/lib/Taxamo/data/ca-certificates.crt
3,011 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP747942,8202,872
JavaScript21522107
JSON10030
Markdown1102

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes76
▷ Abstract classes11.32%
▷ Concrete classes7598.68%
▷ Final classes00.00%
Methods66
▷ Static methods46.06%
▷ Public methods6598.48%
▷ Protected methods11.52%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin