73% pleasant-viewer

Code Review | Pleasant Viewer

WordPress plugin Pleasant Viewer scored 73% from 54 tests.

About plugin

  • Plugin page: pleasant-viewer
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0
  • WordPress version: 6.3.1
  • First release: May 29, 2013
  • Latest release: Jun 14, 2022
  • Number of updates: 52
  • Update frequency: every 63.6 days
  • Top authors: gserafini (76.92%)jscs (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,184 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.66ms] Passed 4 tests

This is a short check of server-side resources used by Pleasant Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.44 ▼5.71
Dashboard /wp-admin3.32 ▲0.0144.87 ▼0.57
Posts /wp-admin/edit.php3.37 ▲0.0146.79 ▲1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.23 ▲0.35
Media Library /wp-admin/upload.php3.24 ▲0.0135.93 ▼0.69
Pleasant Viewer /wp-admin/options-general.php?page=pleasant_viewer3.1829.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Pleasant Viewer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.93 ▼0.7210.17 ▲8.4336.60 ▼6.85
Dashboard /wp-admin2,207 ▲165.80 ▲0.9396.41 ▼17.1538.61 ▼2.96
Posts /wp-admin/edit.php2,093 ▲12.04 ▼0.0739.24 ▲4.7935.29 ▲2.41
Add New Post /wp-admin/post-new.php1,536 ▲1622.91 ▼0.17584.42 ▼106.9960.50 ▼1.63
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0299.03 ▼19.8141.11 ▼10.62
Pleasant Viewer /wp-admin/options-general.php?page=pleasant_viewer7962.0323.9628.07

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=pleasant_viewer
    • > Notice in wp-content/plugins/pleasant-viewer/pleasant-viewer.php+404
    Trying to access array offset on value of type bool

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/pleasant-viewer/template_entry_form.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pleasant-viewer/pleasant-viewer.php:234
    • > PHP Notice
      Undefined variable: category_options in wp-content/plugins/pleasant-viewer/template_entry_form.php on line 7
    • > PHP Notice
      Undefined index: post_citations in wp-content/plugins/pleasant-viewer/template_entry_form.php on line 16
    • > PHP Notice
      Undefined index: post_topic in wp-content/plugins/pleasant-viewer/template_entry_form.php on line 6
    • > PHP Notice
      Undefined index: post_introduction in wp-content/plugins/pleasant-viewer/template_entry_form.php on line 11
    • > PHP Notice
      Undefined index: rendered_citations in wp-content/plugins/pleasant-viewer/template_entry_form.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
6 plugin tags: lesson, christian-science, viewer, citations, science-and-health...

pleasant-viewer/pleasant-viewer.php Passed 13 tests

"Pleasant Viewer" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
Easily share Wednesday Readings and other Bible and Science and Health citations online. Uses cskit-rb to retrieve citations.

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
Success! There were no dangerous files found in this plugin462 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP211663327
JavaScript1284135

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected