94% pop-up-element-for-flatsome-theme

Code Review | Flatsome pop-up element

WordPress plugin Flatsome pop-up element scored 94% from 54 tests.

About plugin

  • Plugin page: pop-up-element-fo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1.1
  • WordPress version: 5.8.1
  • First release: May 3, 2019
  • Latest release: May 3, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: freelancerviet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,445 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼144.73ms] Passed 4 tests

An overview of server-side resources used by Flatsome pop-up element
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1728.02 ▲4.18
Dashboard /wp-admin3.11 ▲0.0545.30 ▼1.96
Posts /wp-admin/edit.php3.16 ▲0.0544.30 ▼4.80
Add New Post /wp-admin/post-new.php5.47 ▲0.0390.37 ▼573.04
Media Library /wp-admin/upload.php3.05 ▲0.0532.36 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flatsome pop-up element
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.97 ▲0.3711.45 ▲1.6451.17 ▲5.24
Dashboard /wp-admin2,970 ▲396.10 ▲0.12142.06 ▼2.39117.90 ▲17.60
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0171.11 ▲2.4091.18 ▼2.61
Add New Post /wp-admin/post-new.php1,683 ▼018.79 ▲0.03409.15 ▲13.45108.52 ▼0.90
Media Library /wp-admin/upload.php1,751 ▼535.01 ▼0.03157.69 ▼0.16133.13 ▲14.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pop-up-element-for-flatsome-theme/index.php:255

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: flatsome, advertisment, flatsome popup, popup, pop-up

pop-up-element-for-flatsome-theme/index.php 85% from 13 tests

The principal PHP file in "Flatsome pop-up element" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pop-up-element-for-flatsome-theme.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected364 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12116364

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected