84% presenter

Code Review | Presenter

WordPress plugin Presenter scored84%from 54 tests.

About plugin

  • Plugin page: presenter
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: May 29, 2012
  • Latest release: Aug 13, 2022
  • Number of updates: 26
  • Update frequency: every 143.5 days
  • Top authors: aaroncampbell (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /9,608 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
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲0.23ms] Passed 4 tests

An overview of server-side resources used by Presenter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1840.12 ▼0.55
Dashboard /wp-admin3.48 ▲0.1753.32 ▲3.35
Posts /wp-admin/edit.php3.59 ▲0.2451.99 ▲0.28
Add New Post /wp-admin/post-new.php6.06 ▲0.17100.27 ▼0.35
Media Library /wp-admin/upload.php3.40 ▲0.1740.05 ▲1.54
Add New /wp-admin/post-new.php?post_type=slideshow3.5257.43
All Slideshows /wp-admin/edit.php?post_type=slideshow3.4441.03

Server storage [IO: ▲6.99MB] [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: 159 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Presenter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.25 ▼0.111.76 ▼0.1941.99 ▼0.21
Dashboard /wp-admin2,222 ▲455.62 ▼0.0391.46 ▼2.6640.00 ▼3.46
Posts /wp-admin/edit.php2,127 ▲242.02 ▲0.0441.53 ▲2.8835.96 ▼4.13
Add New Post /wp-admin/post-new.php1,549 ▲2323.34 ▼0.14661.61 ▼6.6852.39 ▼3.12
Media Library /wp-admin/upload.php1,421 ▲184.28 ▲0.0797.79 ▼6.5945.98 ▲4.14
Add New /wp-admin/post-new.php?post_type=slideshow2,6127.71195.0159.54
All Slideshows /wp-admin/edit.php?post_type=slideshow1,1001.9729.9834.00

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/presenter/templates/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/presenter/templates/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/presenter/presenter.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/presenter/templates/footer.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: slides, slideshare, keynote, slideshow, presentations...

presenter/presenter.php 92% from 13 tests

"Presenter" version 1.5.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please use more than 10 characters for the plugin description (currently 9 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin33,673 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
JSON20017,389
JavaScript542,3422,5855,631
HTML251,099363,880
CSS206494103,492
Sass195641442,507
PHP4120164650
Markdown5570104
YAML25020

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.32
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods2163.64%
▷ Protected methods13.03%
▷ Private methods1133.33%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
reveal.js/examples/assets/image2.png10.00KB5.27KB▼ 47.25%
reveal.js/examples/assets/image1.png21.48KB8.50KB▼ 60.42%