84% yumpu-epaper-publishing

Code Review | Yumpu ePaper publishing

WordPress plugin Yumpu ePaper publishing scored 84% from 54 tests.

About plugin

  • Plugin page: yumpu-epaper-publ...
  • Plugin version: 2.0.24
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Nov 17, 2014
  • Latest release: Aug 3, 2021
  • Number of updates: 54
  • Update frequency: every 45.4 days
  • Top authors: Yumpu (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

2,000+ active / 28,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼141.26ms] Passed 4 tests

Server-side resources used by Yumpu ePaper publishing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.3035.28 ▲14.02
Dashboard /wp-admin3.31 ▲0.2546.11 ▲3.16
Posts /wp-admin/edit.php3.36 ▲0.2540.02 ▼2.47
Add New Post /wp-admin/post-new.php5.60 ▲0.1793.16 ▼562.86
Media Library /wp-admin/upload.php3.19 ▲0.1929.32 ▼2.85
Yumpu PDF Settings /wp-admin/options-general.php?page=yumpu-settings3.1728.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 618 new files
Database: 1 new table, no new options
New tables
wp_yumpu_documents

Browser metrics Passed 4 tests

Yumpu ePaper publishing: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,747 ▲15115.96 ▼0.068.00 ▼0.6547.75 ▲2.89
Dashboard /wp-admin3,004 ▲735.95 ▼0.20132.99 ▼8.75109.53 ▼8.56
Posts /wp-admin/edit.php2,773 ▲342.69 ▼0.0073.22 ▲4.9394.38 ▼1.99
Add New Post /wp-admin/post-new.php1,894 ▲22219.18 ▲0.25360.02 ▼14.88100.35 ▼7.41
Media Library /wp-admin/upload.php1,841 ▲345.08 ▲0.04140.23 ▼5.02119.05 ▼2.39
Yumpu PDF Settings /wp-admin/options-general.php?page=yumpu-settings1,1152.6377.0374.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_yumpu_documents

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/yumpu-epaper-publishing/templates/admin_upload_response.php:2
    • > PHP Fatal error
      Uncaught YumpuEpaper_repository_exception: API-Error in wp-content/plugins/yumpu-epaper-publishing/lib/YumpuAPI.php:172
    • > PHP Notice
      Undefined index: tokenid in wp-content/plugins/yumpu-epaper-publishing/lib/epapers.php on line 7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/yumpu-epaper-publishing/templates/admin_settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/yumpu-epaper-publishing/yumpu.php:55
    • > PHP Warning
      require(../../../../examples/server_side/scripts/ssp.class.php): failed to open stream: No such file or directory in wp-content/plugins/yumpu-epaper-publishing/misc/DataTables-1.10.12/extensions/Scroller/examples/data/ssp.php on line 53
    • > PHP Fatal error
      require(): Failed opening required '../../../../examples/server_side/scripts/ssp.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/yumpu-epaper-publishing/misc/DataTables-1.10.12/extensions/Scroller/examples/data/ssp.php on line 53
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/yumpu-epaper-publishing/templates/admin_editor.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/yumpu-epaper-publishing/templates/admin_files.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: embed, yumpu, publishing, flipbook, publication...

yumpu-epaper-publishing/yumpu.php 92% from 13 tests

The entry point to "Yumpu ePaper publishing" version 2.0.24 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yumpu-epaper-publishing.php" instead of "yumpu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin201,792 lines of code in 532 files:
LanguageFilesBlank linesComment linesLines of code
HTML2631,5710162,825
JavaScript978,12421,97730,139
CSS1352992836,773
PHP153443691,474
Markdown142420297
Sass44211196
JSON40088

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods90
▷ Static methods1011.11%
▷ Public methods7987.78%
▷ Protected methods00.00%
▷ Private methods1112.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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
36 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
misc/js/yumpuEditor/icon.png1.42KB1.10KB▼ 22.80%
misc/DataTables-1.10.2/extensions/TableTools/images/background.png0.92KB0.08KB▼ 91.21%
misc/DataTables-1.10.2/extensions/TableTools/images/pdf.png4.22KB1.10KB▼ 73.99%
misc/DataTables-1.10.2/extensions/TableTools/images/collection.png1.14KB0.17KB▼ 84.91%
misc/DataTables-1.10.2/extensions/ColReorder/images/insert.png1.84KB0.82KB▼ 55.60%