10% perfit-signup-form

Code Review | Formulario de Perfit Email Marketing

WordPress plugin Formulario de Perfit Email Marketing scored10%from 54 tests.

About plugin

  • Plugin page: perfit-signup-form
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2015
  • Latest release: Apr 16, 2018
  • Number of updates: 24
  • Update frequency: every 42.8 days
  • Top authors: PerfitDev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /11,821 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/perfit-signup-form/perfit_optin.php+89
    Methods with the same name as their class will not be constructors in a future version of PHP; perfit_optin_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.66ms] Passed 4 tests

An overview of server-side resources used by Formulario de Perfit Email Marketing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.389.82 ▼28.70
Dashboard /wp-admin2.10 ▼1.245.30 ▼56.77
Posts /wp-admin/edit.php2.10 ▼1.265.95 ▼39.74
Add New Post /wp-admin/post-new.php2.10 ▼3.797.87 ▼89.26
Media Library /wp-admin/upload.php2.10 ▼1.135.46 ▼32.88

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_perfit_widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Formulario de Perfit Email Marketing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4313.19 ▼1.174.78 ▲2.9540.63 ▲0.96
Dashboard /wp-admin2,231 ▲545.74 ▲0.0994.68 ▲10.2775.62 ▲31.93
Posts /wp-admin/edit.php2,141 ▲412.26 ▲0.2439.30 ▲1.7239.56 ▲5.18
Add New Post /wp-admin/post-new.php1,713 ▲17722.72 ▲4.58697.47 ▲49.1527.02 ▼45.00
Media Library /wp-admin/upload.php1,439 ▲394.41 ▲0.23100.78 ▲2.9358.91 ▲15.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/perfit-signup-form/perfit_optin.php+89
    Methods with the same name as their class will not be constructors in a future version of PHP; perfit_optin_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_perfit_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/perfit-signup-form/tpl/login.php
    • > /wp-content/plugins/perfit-signup-form/tpl/shortcode.php
    • > /wp-content/plugins/perfit-signup-form/css/perfit-optin.css.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/perfit-signup-form/includes/loader.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/perfit-signup-form/lib/Perfit.php on line 99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/perfit-signup-form/tpl/list.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/perfit-signup-form/includes/loader.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/perfit-signup-form/tpl/widget.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/perfit-signup-form/lib/Perfit.php on line 99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/perfit-signup-form/includes/loader.php:12
    • > PHP Notice
      Undefined index: button-bg in wp-content/plugins/perfit-signup-form/css/perfit-optin.css.php on line 4
    • > PHP Notice
      Undefined index: form-text in wp-content/plugins/perfit-signup-form/css/perfit-optin.css.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/perfit-signup-form/tpl/login.php on line 11

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: email, form, subscription, marketing, optin

perfit-signup-form/perfit_optin.php 92% from 13 tests

The principal PHP file in "Formulario de Perfit Email Marketing" v. 2.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("perfit-signup-form.php" instead of "perfit_optin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected610 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13163220607
JavaScript1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1875.00%
▷ Protected methods00.00%
▷ Private methods625.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png10.45KB4.54KB▼ 56.54%
images/menu-icon.png0.43KB0.54KB0.00%