79% pronamic-client

Code Review | Pronamic Client

WordPress plugin Pronamic Client scored79%from 54 tests.

About plugin

  • Plugin page: pronamic-client
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 15, 2012
  • Latest release: Nov 29, 2023
  • Number of updates: 90
  • Update frequency: every 47.8 days
  • Top authors: pronamic (63.33%)remcotolsma (37.78%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /16,588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▼1.93ms] Passed 4 tests

This is a short check of server-side resources used by Pronamic Client
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4141.82 ▲1.14
Dashboard /wp-admin4.28 ▲0.9855.82 ▲5.26
Posts /wp-admin/edit.php3.84 ▲0.4850.78 ▲3.43
Add New Post /wp-admin/post-new.php6.39 ▲0.5094.07 ▼17.05
Media Library /wp-admin/upload.php3.71 ▲0.4838.58 ▲4.78

Server storage [IO: ▲1.76MB] [DB: ▲0.08MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Pronamic Client
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19414.11 ▼0.671.79 ▲0.1745.45 ▲0.29
Dashboard /wp-admin2,338 ▲1585.60 ▲0.0892.93 ▼0.6342.92 ▼0.82
Posts /wp-admin/edit.php2,174 ▲741.99 ▼0.0339.35 ▲0.7638.58 ▲4.31
Add New Post /wp-admin/post-new.php1,568 ▲4223.27 ▲0.22648.99 ▲1.0959.29 ▲5.31
Media Library /wp-admin/upload.php1,468 ▲684.18 ▼0.0199.28 ▲1.1139.72 ▼4.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • pronamic_client_db_version
    • widget_recent-posts
    • can_compress_scripts
    • 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)
Even though no errors were found, 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/pronamic-client/adminer/adminer.php
    • > /wp-content/plugins/pronamic-client/adminer/index.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/pronamic-client/admin/extensions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/pronamic-client/templates/google-tag-manager-head.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pronamic-client/templates/google-analytics-tracking-code.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pronamic-client/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack\\Autoloader\\jp4924105b56db68790f4db02e3eaaa819\\al2_12_0\\wp_normalize_path() in wp-content/plugins/pronamic-client/vendor/jetpack-autoloader/class-path-processor.php:73
    • > PHP Warning
      require_once(wp-content/plugins/pronamic-client/vendor/automattic/jetpack-autoloader/src/jetpack-autoloader/class-autoloader.php): failed to open stream: No such file or directory in wp-content/plugins/pronamic-client/vendor/automattic/jetpack-autoloader/src/autoload.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pronamic-client/admin/email.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/pronamic-client/vendor/automattic/jetpack-autoloader/src/jetpack-autoloader/class-autoloader.php' (include_path='.:/usr/share/php') in wp-content/plugins/pronamic-client/vendor/automattic/jetpack-autoloader/src/autoload.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pronamic-client/templates/google-tag-manager-body.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Pronamic\\WordPress\\PronamicClient\\Plugin' not found in wp-content/plugins/pronamic-client/admin/dashboard/adminer.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
9 plugin tags: theme, themes, extensions, extension, client...

pronamic-client/pronamic-client.php Passed 13 tests

This is the main PHP file of "Pronamic Client" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
WordPress plugin for Pronamic clients.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected13,863 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
PHP881,3603,0235,732
JSON12004,688
JavaScript57683252,308
Markdown72190541
PO File2438877292
CSS3343276
XML35023
SVG3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes61
▷ Abstract classes00.00%
▷ Concrete classes61100.00%
▷ Final classes00.00%
Methods377
▷ Static methods4311.41%
▷ Public methods32185.15%
▷ Protected methods82.12%
▷ Private methods4812.73%
Functions225
▷ Named functions21696.00%
▷ Anonymous functions94.00%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.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
6 PNG files occupy 0.28MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/github-banner.png52.49KB52.43KB0.12%
packages/mho79/swipebox/1.4.4/img/icons.png0.71KB0.43KB▼ 39.64%
vendor/pronamic/pronamic-mollie-user-agent/assets/screenshot-1.png171.11KB92.23KB▼ 46.10%
assets/github-social-preview.png64.16KB64.11KB0.09%
images/icon-16x16.png0.42KB0.29KB▼ 31.46%