10% totalpat

Code Review | Totalpat

WordPress plugin Totalpat scored10%from 54 tests.

About plugin

  • Plugin page: totalpat
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: Aug 10, 2016
  • Number of updates: 121
  • Update frequency: every 3.2 days
  • Top authors: Totalpat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,540 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/totalpat/data.config.php+30
    Undefined offset: 0

Server metrics [RAM: ▼1.68MB] [CPU: ▼50.91ms] Passed 4 tests

An overview of server-side resources used by Totalpat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.145.33 ▼30.05
Dashboard /wp-admin2.34 ▼1.016.74 ▼50.54
Posts /wp-admin/edit.php2.34 ▼1.018.05 ▼37.18
Add New Post /wp-admin/post-new.php2.34 ▼3.546.69 ▼85.88
Media Library /wp-admin/upload.php2.35 ▼0.877.52 ▼24.07

Server storage [IO: ▲25.81MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • Total filesystem usage should be limited to 25MB (currently using 25.81MB)
Filesystem: 33 new files
Database: 1 new table, 7 new options
New tables
wp_totalpat
New WordPress options
widget_recent-posts
widget_recent-comments
totalpat_db_version
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Totalpat: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.25 ▼0.131.77 ▲0.1638.34 ▼2.80
Dashboard /wp-admin2,200 ▲205.66 ▲0.0080.71 ▼3.6584.85 ▲42.02
Posts /wp-admin/edit.php2,114 ▲171.97 ▲0.0240.71 ▲4.1334.39 ▼0.44
Add New Post /wp-admin/post-new.php1,699 ▲17024.18 ▲1.03686.15 ▲81.0443.51 ▼13.11
Media Library /wp-admin/upload.php1,414 ▲204.12 ▼0.0796.88 ▲1.8364.29 ▲22.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/totalpat/data.config.php+30
    Undefined offset: 0
  • Zombie tables were found after uninstall: 1 table
    • wp_totalpat
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • totalpat_db_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/totalpat/webservice/sincronizarServer.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' (this will throw an Error in a future version of PHP) in wp-content/plugins/totalpat/data.config.webservice.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/nusoapmime.php on line 42
    • > PHP Warning
      require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/nusoapmime.php on line 42
    • > PHP Warning
      Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/totalpat/data.config.webservice.php on line 49
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/class.soap_parser.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/totalpat/data.config.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/class.soap_fault.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/totalpat/webservice/totalpat_lib/soap/class.wsdl.php:15
    • > PHP Notice
      Undefined variable: results in wp-content/plugins/totalpat/data.config.webservice.php on line 30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: totalpat, suscribe, marketing, email marketing, forms...

totalpat/totalpat.php Passed 13 tests

This is the main PHP file of "Totalpat" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
Comunicación entre la WP y Totalpat para la retroalimentación de estadísticas, formularios y cookies.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected173,037 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,1855,740173,035
XML2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity79.66
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.34
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods375
▷ Static methods00.00%
▷ Public methods33990.40%
▷ Protected methods369.60%
▷ Private methods00.00%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
Constants84
▷ Global constants2934.52%
▷ Class constants5565.48%
▷ Public constants55100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/totalPat_logo.png7.15KB2.96KB▼ 58.55%