84% phcfx-web2lead

Code Review | Wordpress2Lead for PHC CRM FX

WordPress plugin Wordpress2Lead for PHC CRM FX scored84%from 54 tests.

About plugin

  • Plugin page: phcfx-web2lead
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 6, 2015
  • Latest release: Feb 16, 2015
  • Number of updates: 9
  • Update frequency: every 5.3 days
  • Top authors: phcwordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /706 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.49ms] Passed 4 tests

Server-side resources used by Wordpress2Lead for PHC CRM FX
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.63 ▼8.97
Dashboard /wp-admin3.36 ▲0.0246.50 ▼18.27
Posts /wp-admin/edit.php3.47 ▲0.1245.31 ▼1.31
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.59 ▼13.41
Media Library /wp-admin/upload.php3.28 ▲0.0636.76 ▲1.23
Wordpress2Lead for PHC CRM FX /wp-admin/options-general.php?page=phcfx-web2lead3.2732.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
phcfx-web2lead
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress2Lead for PHC CRM FX
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3814.38 ▲0.021.55 ▼0.3639.90 ▼3.50
Dashboard /wp-admin2,233 ▲625.63 ▲0.1087.13 ▼1.9846.72 ▲7.57
Posts /wp-admin/edit.php2,136 ▲392.10 ▲0.0933.16 ▼1.3636.93 ▼0.02
Add New Post /wp-admin/post-new.php1,556 ▲2823.43 ▲0.40647.71 ▼45.2355.55 ▲1.03
Media Library /wp-admin/upload.php1,435 ▲354.20 ▼0.0493.61 ▲1.1840.78 ▲1.35
Wordpress2Lead for PHC CRM FX /wp-admin/options-general.php?page=phcfx-web2lead1,5232.1424.2227.16

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • phcfx-web2lead
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/phcfx-web2lead/phcfx-web2lead-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/phcfx-web2lead/phcfx-web2lead.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/phcfx-web2lead/phcfx-web2lead-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/phcfx-web2lead/settings/form-fields.php:3
    • > PHP Warning
      Use of undefined constant PLUGIN_NAME - assumed 'PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/phcfx-web2lead/phcfx-web2lead-settings.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/phcfx-web2lead/settings/backend.php:7

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (An example form generated with WordPress2Lead for PHC CRM FX), #2 (The backend settings page in WordPress), #3 (And also the form settings page (where form fields are selected))
Please take inspiration from this readme.txt

phcfx-web2lead/phcfx-web2lead.php 92% from 13 tests

The entry point to "Wordpress2Lead for PHC CRM FX" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

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
Everything looks great! No dangerous files found in this plugin427 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP79369387
JavaScript1182040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.67KB11.78KB▼ 52.25%
screenshot-3.png54.25KB29.66KB▼ 45.32%
screenshot-2.png121.81KB65.52KB▼ 46.21%
images/refresh.png0.42KB0.31KB▼ 25.29%
images/phcfx-crm.png4.65KB2.94KB▼ 36.73%