84% issuu-pdf-sync

Code Review | Issuu PDF Sync

WordPress plugin Issuu PDF Sync scored84%from 54 tests.

About plugin

  • Plugin page: issuu-pdf-sync
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.5
  • WordPress version: 6.3.1
  • First release: Jul 15, 2011
  • Latest release: Apr 9, 2018
  • Number of updates: 54
  • Update frequency: every 45.6 days
  • Top authors: benjaminniess (79.63%)remcotolsma (20.37%)pronamic (3.7%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /80,554 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.14ms] Passed 4 tests

An overview of server-side resources used by Issuu PDF Sync
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.19 ▼2.62
Dashboard /wp-admin3.44 ▲0.0947.62 ▼13.73
Posts /wp-admin/edit.php3.55 ▲0.2047.83 ▲0.70
Add New Post /wp-admin/post-new.php6.02 ▲0.1481.00 ▼19.26
Media Library /wp-admin/upload.php3.36 ▲0.1335.24 ▼0.96
Issuu PDF Sync /wp-admin/options-general.php?page=ips-options3.4035.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
ips_options
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Issuu PDF Sync
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.16 ▼0.221.58 ▼0.1936.97 ▼5.84
Dashboard /wp-admin2,202 ▲315.63 ▼0.0485.74 ▼17.9735.73 ▼11.93
Posts /wp-admin/edit.php2,104 ▲42.14 ▲0.1638.50 ▲2.3537.06 ▲0.25
Add New Post /wp-admin/post-new.php1,542 ▲1623.14 ▼0.20586.45 ▼27.4659.67 ▲12.50
Media Library /wp-admin/upload.php1,398 ▲44.20 ▲0.0999.07 ▼2.2243.27 ▲2.10
Issuu PDF Sync /wp-admin/options-general.php?page=ips-options1,4312.6348.2836.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • ips_options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/issuu-pdf-sync/views/admin-insert-modal.tpl.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/issuu-pdf-sync/views/admin-no-pdf-yet.tpl.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/issuu-pdf-sync/issuu-pdf-sync.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/issuu-pdf-sync/views/admin-options.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/issuu-pdf-sync/views/admin-sync-input.tpl.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/issuu-pdf-sync/views/admin-media-javascript.tpl.php:4

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 93% 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
8 plugin tags: synchronisation, pdf, flipbook, upload, book...

issuu-pdf-sync/issuu-pdf-sync.php 85% from 13 tests

The main PHP file in "Issuu PDF Sync" ver. 3.1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Git Repository: Please do not include Git repositories in your plugin
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,225 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PO File64094571,081
PHP102701931,013
XML549081
JavaScript211350

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.25
▷ Minimum class complexity25.00
▷ Maximum class complexity49.00
Average method complexity5.81
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2064.52%
▷ Public methods3096.77%
▷ Protected methods00.00%
▷ Private methods13.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.25MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/issuu_logo.png1.03KB1.11KB0.00%
images/default.png73.36KB30.33KB▼ 58.66%
images/layout-double-pages.png0.32KB0.18KB▼ 42.90%
images/screenshot-5.png74.33KB30.08KB▼ 59.54%
images/layout-single-page.png0.19KB0.12KB▼ 36.08%