84% poppop

Code Review | PopPop

WordPress plugin PopPop scored84%from 54 tests.

About plugin

  • Plugin page: poppop
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jun 21, 2012
  • Latest release: Apr 28, 2013
  • Number of updates: 31
  • Update frequency: every 10.0 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /8,399 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by PopPop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.27 ▲5.90
Dashboard /wp-admin3.36 ▲0.0251.74 ▼11.48
Posts /wp-admin/edit.php3.48 ▲0.1249.86 ▲1.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.19 ▼15.27
Media Library /wp-admin/upload.php3.28 ▲0.0642.78 ▲1.58

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for PopPop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.48 ▲0.092.17 ▲0.2546.56 ▲0.94
Dashboard /wp-admin2,221 ▲204.82 ▼0.15123.97 ▲3.7944.82 ▲0.48
Posts /wp-admin/edit.php2,100 ▲32.06 ▲0.0436.33 ▼0.7534.43 ▲0.65
Add New Post /wp-admin/post-new.php1,554 ▲818.22 ▼4.95640.33 ▼68.3672.87 ▲8.62
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0398.40 ▼15.9249.37 ▼3.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Popup_Script' not found in wp-content/plugins/poppop/includes/class-popup-rokbox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/poppop/init.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Popup_Script' not found in wp-content/plugins/poppop/includes/class-popup-reveal.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: popup, reveal, modal, pop-up, theme...

poppop/init.php 92% from 13 tests

The primary PHP file in "PopPop" version 0.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("poppop.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin294 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45476250
CSS191443
JavaScript1071

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
scripts/reveal/modal-gloss.png2.84KB2.69KB▼ 5.43%