94% pressenter

Code Review | Pressenter

WordPress plugin Pressenter scored 94% from 54 tests.

About plugin

  • Plugin page: pressenter
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5.1
  • WordPress version: 5.8.1
  • First release: May 21, 2020
  • Latest release: Sep 2, 2020
  • Number of updates: 6
  • Update frequency: every 17.3 days
  • Top authors: dharman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 223 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Pressenter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.1742.11 ▲4.75
Dashboard /wp-admin3.22 ▲0.1750.81 ▲5.60
Posts /wp-admin/edit.php3.34 ▲0.2346.89 ▲0.59
Add New Post /wp-admin/post-new.php5.66 ▲0.2394.90 ▼565.81
Media Library /wp-admin/upload.php3.17 ▲0.1735.20 ▲3.67
Add new /wp-admin/admin.php?page=new-pressentation3.1431.49
Presentations /wp-admin/admin.php?page=pressentation3.2131.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
pressenter

Browser metrics Passed 4 tests

Pressenter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,890 ▲29417.04 ▲1.4618.88 ▲6.9849.79 ▲4.45
Dashboard /wp-admin3,002 ▲685.87 ▼0.05142.32 ▼12.83100.77 ▼3.62
Posts /wp-admin/edit.php2,784 ▲452.73 ▲0.0366.52 ▼1.7086.32 ▼0.05
Add New Post /wp-admin/post-new.php1,523 ▼2,05218.84 ▲4.01400.44 ▼71.20110.96 ▲8.62
Media Library /wp-admin/upload.php1,842 ▲355.06 ▲0.00165.27 ▲14.24115.34 ▲2.07
Add new /wp-admin/admin.php?page=new-pressentation1,1262.3578.0878.20
Presentations /wp-admin/admin.php?page=pressentation1,3252.3660.8471.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Pressenter\\get_file_data() in wp-content/plugins/pressenter/includes/Main.class.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Pressenter\\TableView' not found in wp-content/plugins/pressenter/includes/PresentationsTable.class.php:4
    • > PHP Fatal error
      Trait 'Pressenter\\Presentation' not found in wp-content/plugins/pressenter/includes/Main.class.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/pressenter/includes/TableView.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Pressenter\\TableView' not found in wp-content/plugins/pressenter/includes/SlidesTable.class.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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: presentation, learning, slide, meeting

pressenter/plugin.php 92% from 13 tests

The main PHP file in "Pressenter" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pressenter.php" instead of "plugin.php")

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 plugin4,477 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript375312,976
PHP17181291,039
CSS24422339
PO File15067123

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.86
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits3
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods4573.77%
▷ Protected methods58.20%
▷ Private methods1118.03%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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 images were found in this plugin