84% openpublishing

Code Review | OpenPublishing

WordPress plugin OpenPublishing scored84%from 54 tests.

About plugin

  • Plugin page: openpublishing
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.3.3
  • WordPress version: 6.3.1
  • First release: May 3, 2018
  • Latest release: May 29, 2020
  • Number of updates: 37
  • Update frequency: every 20.5 days
  • Top authors: openpublishing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.04ms] Passed 4 tests

This is a short check of server-side resources used by OpenPublishing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.79 ▼1.07
Dashboard /wp-admin3.41 ▲0.0749.57 ▼10.88
Posts /wp-admin/edit.php3.46 ▲0.1048.37 ▼0.01
Add New Post /wp-admin/post-new.php5.99 ▲0.1088.51 ▼8.20
Media Library /wp-admin/upload.php3.33 ▲0.1037.17 ▲1.56

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
openpublishing_auth_token
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
openpublishing_document_count

Browser metrics Passed 4 tests

A check of browser resources used by OpenPublishing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲8214.17 ▼0.432.05 ▼0.0844.10 ▼10.86
Dashboard /wp-admin2,217 ▲405.58 ▼0.0289.29 ▼4.9140.88 ▼1.21
Posts /wp-admin/edit.php2,119 ▲222.00 ▲0.0337.73 ▲0.9734.08 ▲0.77
Add New Post /wp-admin/post-new.php1,386 ▼14218.88 ▼4.40542.58 ▼74.7975.30 ▲5.77
Media Library /wp-admin/upload.php1,419 ▲164.15 ▼0.0597.66 ▼12.9635.97 ▼9.51

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • openpublishing_document_count
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • openpublishing_auth_token

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Openpublishing\\is_admin() in wp-content/plugins/openpublishing/base.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Openpublishing\\is_admin() in wp-content/plugins/openpublishing/base.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/openpublishing/settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ebook, openpublishing, books

openpublishing/openpublishing.php Passed 13 tests

The primary PHP file in "OpenPublishing" version 1.6 is used by WordPress to initiate all plugin functionality
56 characters long description:
Enrich content with data from the OpenPublishing service

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected454 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP56324417
Markdown127037

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin