78% themify-popup

Code Review | Themify Popup

WordPress plugin Themify Popup scored78%from 54 tests.

About plugin

  • Plugin page: themify-popup
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: May 24, 2023
  • Number of updates: 300
  • Update frequency: every 7.7 days
  • Top authors: themifyme (81.67%)shazdeh (18.67%)

Code review

54 tests

User reviews

11 reviews

Install metrics

9,000+ active /189,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼1.21ms] Passed 4 tests

A check of server-side resources used by Themify Popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.88 ▼2.29
Dashboard /wp-admin3.46 ▲0.1645.20 ▼3.77
Posts /wp-admin/edit.php3.57 ▲0.2246.10 ▼0.46
Add New Post /wp-admin/post-new.php6.15 ▲0.2694.48 ▲4.06
Media Library /wp-admin/upload.php3.38 ▲0.1536.71 ▲1.70
Manage Popups /wp-admin/edit.php?post_type=themify_popup3.4737.48
Add New /wp-admin/post-new.php?post_type=themify_popup3.5754.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Themify Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲23913.93 ▼0.818.98 ▲7.1440.76 ▼7.43
Dashboard /wp-admin2,233 ▲454.86 ▼1.15105.11 ▼11.0439.07 ▼6.73
Posts /wp-admin/edit.php2,113 ▲242.00 ▼0.0133.97 ▼12.4633.99 ▼2.46
Add New Post /wp-admin/post-new.php6,254 ▲4,74018.93 ▲1.18887.73 ▲186.3433.92 ▼22.20
Media Library /wp-admin/upload.php1,418 ▲334.24 ▲0.06101.82 ▼2.0343.07 ▼3.78
Manage Popups /wp-admin/edit.php?post_type=themify_popup1,6271.9932.4230.61
Add New /wp-admin/post-new.php?post_type=themify_popup3,2998.13241.9686.00

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/themify-popup/themify-popup.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/themify-popup/includes/tinymce.php:6
    • > PHP Notice
      Undefined variable: popups in wp-content/plugins/themify-popup/views/render.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Themify_Builder_Layouts_Provider' not found in wp-content/plugins/themify-popup/includes/themify-builder-popup-layout-provider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-popup/views/config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/themify-popup/sample/sample.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function themify_popup_check() in wp-content/plugins/themify-popup/views/styles.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/themify-popup/views/single-popup.php:8

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

themify-popup/themify-popup.php 85% from 13 tests

The principal PHP file in "Themify Popup" v. 1.3.9 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 259 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 detected8,730 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP184765503,559
JavaScript263522682,706
CSS1451862,464
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity51.50
▷ Minimum class complexity1.00
▷ Maximum class complexity172.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods78
▷ Static methods3241.03%
▷ Public methods6583.33%
▷ Protected methods810.26%
▷ Private methods56.41%
Functions54
▷ Named functions5398.15%
▷ Anonymous functions11.85%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
5 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/themify-metabox/img/jquery.minicolors.png24.58KB27.69KB0.00%
includes/themify-metabox/img/ddbtn-blank.png0.07KB0.09KB0.00%
includes/themify-metabox/img/icon-delete.png0.45KB0.46KB0.00%
includes/themify-metabox/img/ddbtn-check.png0.14KB0.23KB0.00%
includes/themify-metabox/img/ddbtn-cross.png0.18KB0.27KB0.00%