77% print-basic-facts

Code Review | Print Basic Facts

WordPress plugin Print Basic Factsscored77%from 54 tests.

About plugin

  • Plugin page: print-basic-facts
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.3-4.9.5
  • WordPress version: 6.3.1
  • First release: Jan 19, 2018
  • Latest release: May 16, 2018
  • Number of updates: 11
  • Update frequency: every 10.6 days
  • Top authors: paranoia1906 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /968 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
Installer ran successfully

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

Analyzing server-side resources used by Print Basic Facts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.79 ▲3.88
Dashboard /wp-admin3.35 ▲0.0554.85 ▲1.26
Posts /wp-admin/edit.php3.46 ▲0.1150.27 ▲0.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0577.98 ▼15.30
Media Library /wp-admin/upload.php3.27 ▲0.0535.20 ▲3.26
Print Basic Facts /wp-admin/tools.php?page=wp-pbf3.51332.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Print Basic Facts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.28 ▼0.301.96 ▲0.2744.58 ▲6.52
Dashboard /wp-admin2,196 ▲165.53 ▼0.0883.72 ▼10.6537.94 ▼5.09
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0634.16 ▼1.1132.03 ▼7.17
Add New Post /wp-admin/post-new.php1,532 ▲623.21 ▲0.41659.55 ▲6.0452.56 ▲0.83
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0296.12 ▼14.5944.97 ▼2.41
Print Basic Facts /wp-admin/tools.php?page=wp-pbf7,7732.4857.14129.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/print-basic-facts/admin/partials/wp-pbf-admin-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=wp-pbf
    • > Network (severe)
    wp-content/plugins/print-basic-facts/admin/fonts/roboto/Roboto-Bold.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=wp-pbf
    • > Network (severe)
    wp-content/plugins/print-basic-facts/admin/fonts/roboto/Roboto-Medium.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=wp-pbf
    • > Network (severe)
    wp-content/plugins/print-basic-facts/admin/fonts/roboto/Roboto-Bold.woff - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=wp-pbf
    • > Network (severe)
    wp-content/plugins/print-basic-facts/admin/fonts/roboto/Roboto-Medium.woff - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Print Basic Facts=== )
The official readme.txt might help

print-basic-facts/wp-pbf.php 77% from 13 tests

"Print Basic Facts" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 486 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("print-basic-facts.php" instead of "wp-pbf.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin672 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12134407501
CSS21618163
JavaScript36128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.83
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
There are no PNG files in this plugin