78% contasimple

Code Review | Contasimple

WordPress plugin Contasimple scored78%from 54 tests.

About plugin

  • Plugin page: contasimple
  • Plugin version: 1.27.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 66
  • Update frequency: every 27.3 days
  • Top authors: contasimple (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /8,991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.41MB] [CPU: ▲1.88ms] Passed 4 tests

Analyzing server-side resources used by Contasimple
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.91 ▲1.4443.58 ▲2.05
Dashboard /wp-admin4.76 ▲1.4251.23 ▼9.73
Posts /wp-admin/edit.php4.81 ▲1.4652.19 ▲3.89
Add New Post /wp-admin/post-new.php7.28 ▲1.39102.11 ▲14.07
Media Library /wp-admin/upload.php4.62 ▲1.3945.94 ▲11.31

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contasimple
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.67 ▲0.061.73 ▼0.0740.25 ▼2.95
Dashboard /wp-admin2,201 ▲245.61 ▲0.0090.46 ▲1.5639.28 ▼1.15
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0436.53 ▼0.7438.73 ▲2.85
Add New Post /wp-admin/post-new.php1,538 ▲718.21 ▼4.90621.30 ▼43.8665.62 ▲18.31
Media Library /wp-admin/upload.php1,397 ▼04.21 ▼0.0299.41 ▲0.1543.26 ▲2.93

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/contasimple/public/partials/plugin-name-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/contasimple/lib/Tests/OperationTypeTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Contasimple\\Swagger\\Client\\Configuration' not found in wp-content/plugins/contasimple/includes/common/CSConfig.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

contasimple/contasimple.php Passed 13 tests

The primary PHP file in "Contasimple" version 1.27.0 is used by WordPress to initiate all plugin functionality
76 characters long description:
This plugin allows you to generate invoices for all your WooCommerce orders.

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 detected30,332 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
PHP954,95315,30222,707
CSS2441345,417
PO File12913831,185
JavaScript413338690
SVG200326
JSON1005
Bourne Shell1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity36.86
▷ Minimum class complexity1.00
▷ Maximum class complexity490.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes79
▷ Abstract classes00.00%
▷ Concrete classes79100.00%
▷ Final classes00.00%
Methods1,738
▷ Static methods24313.98%
▷ Public methods1,70698.16%
▷ Protected methods130.75%
▷ Private methods191.09%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants324
▷ Global constants134.01%
▷ Class constants31195.99%
▷ Public constants311100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin