84% digital-edition

Code Review | Digital Edition

WordPress plugin Digital Edition scored84%from 54 tests.

About plugin

  • Plugin page: digital-edition
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: May 30, 2013
  • Latest release: Oct 17, 2013
  • Number of updates: 8
  • Update frequency: every 17.5 days
  • Top authors: tshedor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

An overview of server-side resources used by Digital Edition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1347.86 ▲7.39
Dashboard /wp-admin3.42 ▲0.0856.54 ▼10.17
Posts /wp-admin/edit.php3.52 ▲0.1654.61 ▲5.45
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.58 ▼12.60
Media Library /wp-admin/upload.php3.35 ▲0.1243.69 ▲9.31
Digital Editions /wp-admin/edit-tags.php?taxonomy=digital_edition_name3.3445.68
Digital Edition Posts /wp-admin/edit.php?post_type=digital-edition3.3745.75
Add New Digital Edition Post /wp-admin/post-new.php?post_type=digital-edition3.4861.47
Digital Editions /wp-admin/edit-tags.php?taxonomy=digital_edition_name&post_type=digital-edition3.3439.19

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Digital Edition: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲6713.34 ▼1.041.84 ▼0.1943.98 ▲0.24
Dashboard /wp-admin2,244 ▲564.88 ▲0.0296.70 ▼12.4739.98 ▲1.18
Posts /wp-admin/edit.php2,141 ▲492.01 ▲0.0136.37 ▼3.9035.18 ▲0.07
Add New Post /wp-admin/post-new.php1,562 ▲4822.98 ▲5.19688.75 ▲33.1954.54 ▼4.31
Media Library /wp-admin/upload.php1,420 ▲294.23 ▲0.0395.74 ▼10.8143.17 ▼3.99
Digital Editions /wp-admin/edit-tags.php?taxonomy=digital_edition_name1,3002.1429.4431.52
Digital Edition Posts /wp-admin/edit.php?post_type=digital-edition1,0962.0633.9730.54
Add New Digital Edition Post /wp-admin/post-new.php?post_type=digital-edition2,8848.56181.4180.52
Digital Editions /wp-admin/edit-tags.php?taxonomy=digital_edition_name&post_type=digital-edition1,2942.1327.5029.39

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/digital-edition/digitial-edition.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/digital-edition/single-digital-edition.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
7 plugin tags: journalism, special edition, multimedia, package, mobile...

digital-edition/digitial-edition.php 85% from 13 tests

The main PHP script in "Digital Edition" version 0.2.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("digital-edition.php" instead of "digitial-edition.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 321 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected672 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22324530
CSS1441088
JavaScript221054

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/help_screen.png46.41KB13.66KB▼ 70.57%
img/help_screen_mobile.png27.28KB8.69KB▼ 68.15%