10% optin-xpert

Code Review | Optin Xpert

WordPress plugin Optin Xpert scored10%from 54 tests.

About plugin

  • Plugin page: optin-xpert
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6+
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Jun 8, 2015
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: themexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,855 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/optin-xpert/assets/vendor/MailChimp/MCAPI.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; MCAPI has a deprecated constructor

Server metrics [RAM: ▼1.77MB] [CPU: ▼60.51ms] Passed 4 tests

A check of server-side resources used by Optin Xpert
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.13 ▼47.34
Dashboard /wp-admin2.23 ▼1.076.09 ▼49.54
Posts /wp-admin/edit.php2.24 ▼1.117.29 ▼45.41
Add New Post /wp-admin/post-new.php2.23 ▼3.655.78 ▼99.74
Media Library /wp-admin/upload.php2.24 ▼0.986.64 ▼29.84

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Optin Xpert
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,092 ▲34615.52 ▲1.2410.25 ▲8.4557.96 ▲13.86
Dashboard /wp-admin2,375 ▲1876.89 ▲1.96138.72 ▲34.4644.56 ▼3.34
Posts /wp-admin/edit.php2,281 ▲1923.56 ▲1.5155.77 ▲14.3334.67 ▼0.63
Add New Post /wp-admin/post-new.php1,542 ▼117.81 ▼0.41589.67 ▼53.6635.40 ▼20.47
Media Library /wp-admin/upload.php1,423 ▲414.28 ▲0.0784.29 ▼16.1442.87 ▼2.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/optin-xpert/assets/vendor/MailChimp/MCAPI.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; MCAPI has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optin-xpert/admin-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/optin-xpert/views/front/stickytop.tpl.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/optin-xpert/views/front/flying.tpl.php:5
    • > PHP Notice
      Undefined variable: OPTIN_TIMER in wp-content/plugins/optin-xpert/views/front/flying.tpl.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optin-xpert/admin-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/optin-xpert/views/settings.tpl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/optin-xpert/views/front/lightbox.tpl.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: Version not formatted correctly
  • Screenshots: Add descriptions for screenshots #0, #0, #0, #0 in optin-xpert/assets to your readme.txt
The official readme.txt is a good inspiration

optin-xpert/optin-xpert.php 92% from 13 tests

"Optin Xpert" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin6,782 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript119761,6164,815
PHP815255730
CSS514427661
SVG101210463
LESS11731102
Markdown14011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity16.00
▷ Minimum class complexity10.00
▷ Maximum class complexity22.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/image/flyer-icon.png26.76KB4.33KB▼ 83.83%