78% popcorn

Code Review | Popcorn

WordPress plugin Popcorn scored78%from 54 tests.

About plugin

  • Plugin page: popcorn
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: Aug 12, 2015
  • Number of updates: 43
  • Update frequency: every 4.0 days
  • Top authors: niravdave (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.24ms] Passed 4 tests

A check of server-side resources used by Popcorn
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.17 ▲1.53
Dashboard /wp-admin3.39 ▲0.0443.92 ▼14.63
Posts /wp-admin/edit.php3.44 ▲0.0945.92 ▲2.15
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.19 ▼14.01
Media Library /wp-admin/upload.php3.31 ▲0.0835.49 ▲4.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
POPCORN_enable
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
POPCORN_sel_dis_opt
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Popcorn: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16014.05 ▼0.237.64 ▲5.9236.20 ▼1.60
Dashboard /wp-admin2,219 ▲424.93 ▼0.7088.79 ▲1.3482.39 ▲41.30
Posts /wp-admin/edit.php2,154 ▲512.57 ▲0.5837.48 ▼1.0234.21 ▲1.64
Add New Post /wp-admin/post-new.php1,719 ▲19122.55 ▼0.47700.75 ▲52.0038.98 ▼11.03
Media Library /wp-admin/upload.php1,446 ▲524.46 ▲0.2795.77 ▼2.9375.51 ▲32.09

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/popcorn/popcorn.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/home/question.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/home/image_only.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/home/custom_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/admin/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popcorn/views/admin/text_only.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/home/text_only.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/admin/question.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popcorn/views/admin/image_only.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popcorn/views/admin/custom_form.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

popcorn/popcorn.php 92% from 13 tests

Analyzing the main PHP file in "Popcorn" version 1.0
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

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
Success! There were no dangerous files found in this plugin1,750 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221960782
CSS35113392
PO File1169174362
JavaScript45125214

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pop_icon.png0.30KB0.30KB0.00%
assets/images/wordpress.png14.98KB15.33KB0.00%
assets/images/close.png1.02KB0.23KB▼ 77.88%