10% retainly

Code Review | Retainly Optin Forms

WordPress plugin Retainly Optin Forms scored10%from 54 tests.

About plugin

  • Plugin page: retainly
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Aug 8, 2017
  • Number of updates: 10
  • Update frequency: every 10.4 days
  • Top authors: retainly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,316 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/retainly/dashboard/includes/options_config.php+47
    sizeof(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲1.36MB] [CPU: ▲5.78ms] Passed 4 tests

Server-side resources used by Retainly Optin Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.91 ▲1.4451.75 ▲10.63
Dashboard /wp-admin4.67 ▲1.3755.79 ▲6.27
Posts /wp-admin/edit.php4.72 ▲1.3758.69 ▲13.11
Add New Post /wp-admin/post-new.php7.20 ▲1.3190.40 ▼6.90
Media Library /wp-admin/upload.php4.60 ▲1.3753.34 ▲15.28
Resources /wp-admin/admin.php?page=rad_rapidology_options4.7244.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 341 new files
Database: 1 new table, 11 new options
New tables
wp_rad_rapidology_stats
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
rad_rapidology_stats_cache
widget_rapidology
rad_rapidology_activated
rad_rapidology_options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Retainly Optin Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,026 ▲25513.82 ▼0.5711.58 ▲9.6043.84 ▼0.23
Dashboard /wp-admin2,252 ▲604.86 ▼0.1098.37 ▼12.4539.87 ▼0.79
Posts /wp-admin/edit.php2,132 ▲432.03 ▲0.0239.98 ▲2.5735.25 ▲0.58
Add New Post /wp-admin/post-new.php1,557 ▲2417.76 ▼5.64598.82 ▼80.8555.04 ▼0.17
Media Library /wp-admin/upload.php1,431 ▲404.24 ▲0.0699.31 ▲1.2244.84 ▲0.04
Optin Forms /wp-admin/admin.php?page=rad_rapidology_options#tab_rad_dashboard_tab_content_header_home4,3046.50141.5876.94
Email Accounts /wp-admin/admin.php?page=rad_rapidology_options#tab_rad_dashboard_tab_content_header_accounts4,3096.48121.2631.22
Resources /wp-admin/admin.php?page=rad_rapidology_options4,2946.49108.7743.98
Statistics /wp-admin/admin.php?page=rad_rapidology_options#tab_rad_dashboard_tab_content_header_stats4,6807.99196.9897.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_rad_rapidology_stats
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • rad_rapidology_stats_cache
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • rad_rapidology_options
    • rad_rapidology_activated
    • widget_rapidology
    • rapidology_update_source
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=rad_rapidology_options
    • > Notice in wp-content/plugins/retainly/dashboard/dashboard.php+1098
    Undefined index: rows

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/retainly/includes/static_content/marketing.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'RAD_RAPIDOLOGY_PLUGIN_DIRrapidology.php' (include_path='.:/usr/share/php') in wp-content/plugins/retainly/includes/classes/integrations/class.rapidology-retainly.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/retainly/dashboard/includes/options_config.php:16
    • > PHP Warning
      require_once(RAD_RAPIDOLOGY_PLUGIN_DIRrapidology.php): failed to open stream: No such file or directory in wp-content/plugins/retainly/includes/classes/integrations/class.rapidology-retainly.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/retainly/includes/rapidology_functions.php:15
    • > PHP Warning
      Use of undefined constant RAD_PLUGIN_IMAGE_DIR - assumed 'RAD_PLUGIN_IMAGE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/retainly/includes/static_content/marketing.php on line 3
    • > PHP Warning
      Use of undefined constant RAD_RAPIDOLOGY_PLUGIN_DIR - assumed 'RAD_RAPIDOLOGY_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/retainly/includes/classes/integrations/class.rapidology-retainly.php on line 3
    • > PHP Warning
      Use of undefined constant RAD_PLUGIN_IMAGE_DIR - assumed 'RAD_PLUGIN_IMAGE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/retainly/includes/static_content/marketing_sidebar.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/retainly/includes/ext/rapidology_rapidbar/class.rapidology_rapidbar.php:6

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)
No browser errors were detected

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
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

retainly/retainly.php Passed 13 tests

The main PHP script in "Retainly Optin Forms" version 1.4 is automatically included on every request by WordPress
83 characters long description:
This plugin helps capture subscribers from your wordpress to your list in retainly.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected35,979 lines of code in 253 files:
LanguageFilesBlank linesComment linesLines of code
SVG16430415618,782
PHP161,31479910,140
JavaScript545461433,216
CSS124631392,984
PO File1321334687
Bourne Shell120694
Markdown235049
XML10014
HTML1008
JSON1005

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 189)
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity187.88
▷ Minimum class complexity4.00
▷ Maximum class complexity888.00
Average method complexity9.54
▷ Minimum method complexity1.00
▷ Maximum method complexity189.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods175
▷ Static methods2011.43%
▷ Public methods17197.71%
▷ Protected methods00.00%
▷ Private methods42.29%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
31 PNG files occupy 0.41MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/premade-image-04.png5.75KB2.65KB▼ 53.81%
images/premade-image-10.png4.07KB2.28KB▼ 44.02%
images/premade-image-16.png21.72KB8.32KB▼ 61.69%
images/premade-image-01.png3.33KB1.88KB▼ 43.49%
images/premade-image-08.png3.92KB2.05KB▼ 47.79%