77% 1000grad-epaper

Code Review | edelpaper

WordPress plugin edelpaper scored 77% from 54 tests.

About plugin

  • Plugin page: 1000grad-epaper
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.4
  • WordPress version: 5.9.2
  • First release: Oct 22, 2012
  • Latest release: Nov 30, 2017
  • Number of updates: 94
  • Update frequency: every 19.9 days
  • Top authors: 1000grad (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active / 28,484 total downloads

Benchmarks

Plugin footprint 82% 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.37MB] [CPU: ▼276.71ms] 75% from 4 tests

An overview of server-side resources used by edelpaper
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,961.05ms on /wp-admin/admin.php?page=epaper_channels)
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4157.65 ▲8.39
Dashboard /wp-admin3.78 ▲0.3792.61 ▲34.93
Posts /wp-admin/edit.php4.01 ▲0.3764.22 ▲26.78
Add New Post /wp-admin/post-new.php7.30 ▲0.32100.50 ▼1,157.84
Media Library /wp-admin/upload.php3.72 ▲0.4340.54 ▲15.82
edelpaper /wp-admin/admin.php?page=epaper_channels4.771,961.05
Registration /wp-admin/admin.php?page=epaper_apikey3.8635.55

Server storage [IO: ▲4.20MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 2 new options
New WordPress options
edelpaper_plugin
plugin_epaper_options

Browser metrics Passed 4 tests

A check of browser resources used by edelpaper
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,208 ▲48616.97 ▲1.4111.52 ▲5.962.95 ▲0.82
Dashboard /wp-admin3,098 ▲2416.42 ▲0.22122.02 ▼4.63180.16 ▲17.19
Posts /wp-admin/edit.php2,890 ▲2023.32 ▲0.0870.04 ▲4.93191.30 ▲44.18
Add New Post /wp-admin/post-new.php1,790 ▲12416.59 ▼3.88461.73 ▼35.39208.80 ▲36.86
Media Library /wp-admin/upload.php1,904 ▲2095.71 ▲0.19149.28 ▲6.67207.26 ▲18.36
edelpaper /wp-admin/admin.php?page=epaper_channels1,2732.8059.56142.74
Registration /wp-admin/admin.php?page=epaper_apikey1,3562.8758.50147.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • plugin_epaper_options
    • edelpaper_plugin

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 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/1000grad-epaper/views/adminpage_epaper_warning.php
    • > /wp-content/plugins/1000grad-epaper/views/adminpage_epaper_info.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/1000grad-epaper/views/adminpage_epaper_template.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'RestApi' not found in wp-content/plugins/1000grad-epaper/lib/epaperChannelApi.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1000grad-epaper/1000grad-epaper.php:45
    • > PHP Notice
      Undefined variable: aEpaperSettings in wp-content/plugins/1000grad-epaper/views/epaper_settings_form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/1000grad-epaper/views/epaper_widget_frontend.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/1000grad-epaper/views/epaper_widget_backend.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/1000grad-epaper/views/shortcode_epaper.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/1000grad-epaper/views/adminpage_update_accountmanager.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/1000grad-epaper/views/tiny_mce_box.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RestApi' not found in wp-content/plugins/1000grad-epaper/lib/epaperApi.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Search for “edelpaper” in the WordPress area “Plugins”), #2 (Click on “Install now”), #3 (To perform the Plugin installation request, WordPress need your server hostname and password to proceed.), #4 (To activate the edelpaper WordPress Plugin just click “Activate” in your Plugin overview of your WordPress installation.), #5 (After the activate process you only have to register your edelpaper WordPress installation. This is neccessary to provide you with two Permalinks, free of charge.), #6 (To register your installation just click “Request new API Key” and you will be forwarded to edelpaper.com for your free sign up. Every WordPress installation will get its own API key and edelpaper account.), #7 (Just sign up for free with your Google or facebook account or enter email and password.), #8 (After successful sign up on edelpaper.com you can use the edelpaper Plugin in your WordPress installation. You have 2 free Permalinks to publish your flip books. To create your flip book just click “upload PDF”. To manage your flip books or further customize them click “Edelpaper CMS” under “Manage your edelpaper”.), #9 (To create your edelpaper flip book click “upload PDF”. The upload and rendering process will start immediatly.), #10 (Your edelpaper flip book is now almost ready to publish. You can specify several settings like player language or the the admition to download the PDF file. Click “save” to publish this edelpaper with the settings you determined.), #11 (Now your first edelpaper flip book is ready to use via shortcode, widget or HTML code to embed it in blog posts, on pages or sidebars.), #12 (You can access on your created flip books via Widget for publishing on pages or use the edelpaper menu tab in your WordPress editor.), #13 (With click on the edelpaper menu tab in your WordPress editor you can choose the flip book you want to insert.), #14 (Manage your subscritions and order additional Permalinks with click on “Manage Subscriptions” in the Plugin menu. Yo will be forwarded to the edelpaper.com log in.), #15 (On edelpaper.com you can manage your subscriptions and add additional Permalinks (Add-ons). To get additional Permalinks you have to sign up for the edelpaper Professional plan.)
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

1000grad-epaper/1000grad-epaper.php 92% from 13 tests

The main PHP script in "edelpaper" version 1.7.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 377 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin3,549 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP204853982,369
CSS212716623
JavaScript48428544
PO File11013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity41.29
▷ Minimum class complexity5.00
▷ Maximum class complexity198.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods109
▷ Static methods21.83%
▷ Public methods9688.07%
▷ Protected methods10.92%
▷ Private methods1211.01%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
24 PNG files occupy 3.97MB with 2.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png315.52KB98.30KB▼ 68.85%
screenshot-13.png177.48KB57.93KB▼ 67.36%
screenshot-15.png155.08KB44.88KB▼ 71.06%
img/edelpaper_logo_100.png4.99KB2.51KB▼ 49.67%
screenshot-2.png160.35KB49.74KB▼ 68.98%