77% rdp-pediapress-embed

Code Review | RDP PediaPress Embed

WordPress plugin RDP PediaPress Embed scored77%from 54 tests.

About plugin

  • Plugin page: rdp-pediapress-embed
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Jul 6, 2017
  • Number of updates: 32
  • Update frequency: every 14.4 days
  • Top authors: rpayne7264 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /981 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
Install script ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲3.10ms] Passed 4 tests

Server-side resources used by RDP PediaPress Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5346.70 ▲2.20
Dashboard /wp-admin4.02 ▲0.7255.27 ▼3.58
Posts /wp-admin/edit.php4.07 ▲0.7158.35 ▲7.24
Add New Post /wp-admin/post-new.php6.54 ▲0.66107.89 ▲9.49
Media Library /wp-admin/upload.php3.88 ▲0.6544.03 ▲6.53
RDP PPE /wp-admin/options-general.php?page=rdp-pediapress-embed3.8540.84

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by RDP PediaPress Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.65 ▼0.875.27 ▲3.3840.74 ▼4.15
Dashboard /wp-admin2,207 ▲275.73 ▲0.0797.07 ▲0.3137.45 ▼3.47
Posts /wp-admin/edit.php2,117 ▲172.08 ▲0.1041.55 ▲4.5935.91 ▼3.59
Add New Post /wp-admin/post-new.php2,136 ▲59918.55 ▲0.48624.94 ▼66.4062.74 ▼8.14
Media Library /wp-admin/upload.php1,417 ▲174.41 ▲0.19100.89 ▼11.5843.78 ▼5.42
RDP PPE /wp-admin/options-general.php?page=rdp-pediapress-embed1,1061.9426.7931.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, 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 | A smoke test targeting server-side errors
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
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/rdp-pediapress-embed/pl/rdpPPE.php
    • > /wp-content/plugins/rdp-pediapress-embed/bl/rdpPPE_RSS.php
    • > /wp-content/plugins/rdp-pediapress-embed/pl/rdpPPEAdminMenu.php
    • > /wp-content/plugins/rdp-pediapress-embed/bl/rdpPPEGallery.php
    • > /wp-content/plugins/rdp-pediapress-embed/bl/rdpPPEContent.php
    • > /wp-content/plugins/rdp-pediapress-embed/bl/rdpPPEUtilities.php
    • > /wp-content/plugins/rdp-pediapress-embed/bl/simple_html_dom.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=rdp-pediapress-embed
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Please specify the plugin name on the first line ( === rdp-pediapress-embed === )
  • Screenshots: These screenshots require images: #1 (Embedded PediaPress book page), #2 (Gallery of PediaPress books), #3 (Media button to launch shortcode embed helper form), #4 (PediaPress book shortcode embed helper form), #5 (PediaPress gallery shortcode embed helper form)
The official readme.txt is a good inspiration

rdp-pediapress-embed/index.php 92% from 13 tests

"RDP PediaPress Embed" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rdp-pediapress-embed.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin6,404 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP106311,0463,904
CSS17337562,238
JavaScript5806262

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity75.09
▷ Minimum class complexity7.00
▷ Maximum class complexity198.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods224
▷ Static methods5022.32%
▷ Public methods14765.62%
▷ Protected methods5926.34%
▷ Private methods188.04%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants84
▷ Global constants2732.14%
▷ Class constants5767.86%
▷ Public constants57100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.86MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pl/style/images/notice-icon.png0.44KB0.29KB▼ 32.44%
pl/style/images/ui-bg_glass_100_e4f1fb_1x400.png0.34KB0.16KB▼ 54.29%
pl/style/images/ui-bg_glass_50_3baae3_1x400.png0.33KB0.16KB▼ 50.89%
pl/style/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.38KB0.18KB▼ 52.97%
pl/style/images/ui-bg_flat_15_cd0a0a_40x100.png0.20KB0.08KB▼ 57.77%