84% page-takeover

Code Review | Page Takeover

WordPress plugin Page Takeover scored84%from 54 tests.

About plugin

  • Plugin page: page-takeover
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 6.3.1
  • First release: Mar 6, 2016
  • Latest release: Aug 4, 2021
  • Number of updates: 32
  • Update frequency: every 61.8 days
  • Top authors: wpkube (65.63%)brs (25%)FancyThemes (15.63%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /12,184 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.75ms] Passed 4 tests

Analyzing server-side resources used by Page Takeover
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2051.55 ▲9.36
Dashboard /wp-admin3.53 ▲0.2246.98 ▼6.42
Posts /wp-admin/edit.php3.64 ▲0.2847.64 ▲1.68
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.88 ▼7.04
Media Library /wp-admin/upload.php3.45 ▲0.2245.08 ▲8.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page Takeover
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.13 ▼1.065.67 ▲3.3841.64 ▼7.17
Dashboard /wp-admin2,217 ▲295.86 ▼0.0498.98 ▼16.0989.10 ▲42.94
Posts /wp-admin/edit.php2,103 ▲142.00 ▼0.0334.10 ▼2.2034.74 ▼2.20
Add New Post /wp-admin/post-new.php1,678 ▲14522.43 ▼0.84767.96 ▲100.9766.30 ▲15.81
Media Library /wp-admin/upload.php1,396 ▲144.16 ▼0.0797.41 ▼2.5373.08 ▲29.88

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× 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/page-takeover/includes/general.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-takeover/includes/admin.php:38

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
The official readme.txt might help

page-takeover/page-takeover.php Passed 13 tests

"Page Takeover" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
105 characters long description:
Create a full-screen overlay without a developer. Promote your content and offers in a full-screen popup.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,588 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4297239953
CSS28134476
JavaScript33621159

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-close.png1.04KB0.25KB▼ 76.48%
images/icon.png1.18KB0.38KB▼ 68.13%