77% digital-publications-by-supsystic

Code Review | Digital Publications by Supsystic

WordPress plugin Digital Publications by Supsystic scored77%from 54 tests.

About plugin

  • Plugin page: digital-publicati...
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Nov 8, 2022
  • Number of updates: 97
  • Update frequency: every 26.7 days
  • Top authors: supsystic.com (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /117,528 total downloads

Benchmarks

Plugin footprint 82% 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.15MB] [CPU: ▼45.37ms] Passed 4 tests

Analyzing server-side resources used by Digital Publications by Supsystic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.48142.57 ▼13.89
Dashboard /wp-admin3.56 ▲0.26121.03 ▼26.65
Posts /wp-admin/edit.php3.68 ▼0.1798.01 ▼11.30
Add New Post /wp-admin/post-new.php6.14 ▲0.26183.27 ▼129.62
Media Library /wp-admin/upload.php3.48 ▲0.25130.07 ▲59.88
Publications /wp-admin/edit-tags.php?taxonomy=dps_book3.6696.56
Pages /wp-admin/edit.php?post_type=dps_page3.77163.63
Overview /wp-admin/admin.php?page=digital-publications-supsystic&tab=overview3.59130.15
Digital Publications by Supsystic /wp-admin/admin.php?page=digital-publications-supsystic3.54136.13

Server storage [IO: ▲9.20MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 507 new files
Database: 5 new tables, 10 new options
New tables
wp_dps_page_sort_order
wp_dps_modules_type
wp_dps_page_as_img
wp_dps_modules
wp_dps_usage_stat
New WordPress options
wp_dps_db_version
dps_opts_data
widget_theysaidso_widget
dps_plugin_activation_errors
theysaidso_admin_options
can_compress_scripts
wp_dps_db_installed
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics 75% from 4 tests

A check of browser resources used by Digital Publications by Supsystic
Having an awesome user experience is important, so please improve the following
  • Script duration: Total JavaScript execution time should be lower than 1,500.00ms (currently 1,860.38ms on /wp-admin/admin.php?page=digital-publications-supsystic)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.40 ▲0.146.64 ▲0.8290.63 ▼33.13
Dashboard /wp-admin2,242 ▲354.88 ▼0.10195.13 ▼172.5597.18 ▼39.44
Posts /wp-admin/edit.php2,128 ▲392.03 ▲0.0568.46 ▼28.5474.10 ▼37.23
Add New Post /wp-admin/post-new.php1,457 ▲9617.18 ▼0.451,431.98 ▲107.88109.00 ▼14.66
Media Library /wp-admin/upload.php1,421 ▲364.20 ▲0.05384.06 ▲143.77159.99 ▲61.23
Publications /wp-admin/edit-tags.php?taxonomy=dps_book2,0653.85142.19109.22
Pages /wp-admin/edit.php?post_type=dps_page1,3533.59206.75113.96
Overview /wp-admin/admin.php?page=digital-publications-supsystic&tab=overview2,76826.241,141.23221.93
Digital Publications by Supsystic /wp-admin/admin.php?page=digital-publications-supsystic2,67618.161,860.38191.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-posts
    • dps_opts_data
    • db_upgraded
    • widget_recent-comments
    • dps_plugin_activation_errors
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/lib/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/digital-publications-by-supsystic/modules/supsystic_promo/views/tpl/adminFooter.php
  • 211× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/lib/php-css-parser/lib/Sabberworm/CSS/CSSList/Document.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/lib/php-css-parser/lib/Sabberworm/CSS/Value/RuleValueList.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/src/Positioner/Absolute.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\DirectoryEntry' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/lib/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/src/Positioner/TableCell.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/lib/php-svg-lib/src/Svg/Tag/Ellipse.php:11
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/digital-publications-by-supsystic/config.php on line 10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/src/Adapter/GD.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/digital-publications-by-supsystic/modules/book/classes/dom2pdfnew/src/Positioner/Block.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'viewDps' not found in wp-content/plugins/digital-publications-by-supsystic/modules/mail/views/mail.php:2

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 94% 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 to be fixed:
  • Tags: Too many tags (32 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

digital-publications-by-supsystic/dps.php 92% from 13 tests

This is the main PHP file of "Digital Publications by Supsystic" version 1.7.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("digital-publications-by-supsystic.php" instead of "dps.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin61,856 lines of code in 396 files:
LanguageFilesBlank linesComment linesLines of code
PHP2858,74916,46746,946
CSS663062553,978
JavaScript242293713,794
PO File41,4901,8153,528
SVG2002,679
Markdown41850724
JSON40097
YAML312264
XML43046

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity33.36
▷ Minimum class complexity1.00
▷ Maximum class complexity797.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces33
Interfaces5
Traits0
Classes244
▷ Abstract classes197.79%
▷ Concrete classes22592.21%
▷ Final classes00.00%
Methods2,794
▷ Static methods33612.03%
▷ Public methods2,43687.19%
▷ Protected methods2549.09%
▷ Private methods1043.72%
Functions35
▷ Named functions2057.14%
▷ Anonymous functions1542.86%
Constants238
▷ Global constants6025.21%
▷ Class constants17874.79%
▷ Public constants178100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
52 PNG files occupy 0.47MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/split.png0.64KB1.04KB0.00%
css/images/minimal@2x.png3.38KB2.56KB▼ 24.15%
modules/book/img/tb_simple/Export.png0.43KB0.48KB0.00%
modules/book/img/tb_simple/Go forward.png0.19KB0.19KB0.00%
css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%