78% program-output

Code Review | Program Output

WordPress plugin Program Output scored 78% from 54 tests.

About plugin

  • Plugin page: program-output
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.9
  • WordPress version: 6.3.1
  • First release: Aug 1, 2017
  • Latest release: Feb 15, 2018
  • Number of updates: 23
  • Update frequency: every 37.0 days
  • Top authors: vickyagravat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 784 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.17ms] Passed 4 tests

Server-side resources used by Program Output
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.23 ▼11.60
Dashboard /wp-admin3.34 ▲0.0350.95 ▲5.48
Posts /wp-admin/edit.php3.39 ▲0.0348.49 ▲0.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.73 ▼6.39
Media Library /wp-admin/upload.php3.26 ▲0.0334.68 ▲0.49
Program Output /wp-admin/options-general.php?page=program-output3.2230.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Program Output
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.46 ▼0.071.66 ▼0.1842.36 ▼3.42
Dashboard /wp-admin2,207 ▲225.81 ▲0.96109.65 ▼2.3638.31 ▼5.01
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0040.15 ▼0.7435.73 ▲0.77
Add New Post /wp-admin/post-new.php1,517 ▼517.50 ▼5.59680.77 ▼2.1666.80 ▲8.86
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0195.39 ▼9.4842.05 ▼3.39
Program Output /wp-admin/options-general.php?page=program-output1,0852.1130.2256.44

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/program-output/program-output.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/program-output/includes/program-output-functions.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (This is Console (CMD) Output. Useful for Command Line Output such as C, C++, JAVA etc.), #2 (This is Browser Output. Useful for Web Languages such as ASP, PHP, JSP, HTML, JS, CSS etc.)
The official readme.txt might help

program-output/program-output.php 92% from 13 tests

Analyzing the main PHP file in "Program Output" version 1.1.0
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS23010280
PHP23469195
JavaScript111124

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/console-icon.png0.42KB0.34KB▼ 17.56%
screenshot-1.png11.10KB10.27KB▼ 7.50%
screenshot-2.png10.90KB10.05KB▼ 7.82%
admin/img/browser-icon.png0.55KB0.51KB▼ 7.83%