56% zemanta

Code Review | Editorial Assistant by Sovrn

WordPress plugin Editorial Assistant by Sovrn scored 56% from 54 tests.

About plugin

  • Plugin page: zemanta
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2008
  • Latest release: May 25, 2017
  • Number of updates: 145
  • Update frequency: every 22.6 days
  • Top authors: zemanta (75.86%)ddksr (13.1%)sparkica (6.9%)sovrn (5.52%)zemanta-panco (1.38%)

Code review

54 tests

User reviews

23 reviews

Install metrics

900+ active / 267,425 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼30.75ms] Passed 4 tests

A check of server-side resources used by Editorial Assistant by Sovrn
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.93 ▼2.48
Dashboard /wp-admin3.09 ▼0.2223.14 ▼24.28
Posts /wp-admin/edit.php3.09 ▼0.2723.49 ▼21.88
Add New Post /wp-admin/post-new.php3.09 ▼2.8023.56 ▼66.15
Media Library /wp-admin/upload.php3.09 ▼0.1424.64 ▼10.68
Sovrn /wp-admin/options-general.php?page=zemanta3.0922.19

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
zemanta_plugin_version
widget_recent-posts
ednet_last_sent
widget_recent-comments
widget_theysaidso_widget
zemanta_options

Browser metrics Passed 4 tests

Checking browser requirements for Editorial Assistant by Sovrn
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7814.47 ▲0.111.59 ▼0.2741.34 ▼9.69
Dashboard /wp-admin2,219 ▲315.87 ▲0.03106.12 ▲7.5940.92 ▼5.82
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0233.86 ▼2.9538.32 ▲2.51
Add New Post /wp-admin/post-new.php6,450 ▲4,93620.66 ▲3.11895.47 ▲220.4154.30 ▼4.69
Media Library /wp-admin/upload.php1,401 ▲134.27 ▲0.0795.17 ▼21.0143.06 ▼7.08
Sovrn /wp-admin/options-general.php?page=zemanta1,3176.2456.5863.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 9 options in the database
    • ednet_last_sent
    • theysaidso_admin_options
    • zemanta_plugin_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • zemanta_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=zemanta
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/zemanta/views/message.php
    • > /wp-content/plugins/zemanta/views/options-input-path.php
    • > /wp-content/plugins/zemanta/views/options-input-checkbox.php
    • > /wp-content/plugins/zemanta/views/options-input-apikey.php
    • > /wp-content/plugins/zemanta/mixpanel/examples/error_handling.php
    • > /wp-content/plugins/zemanta/views/stylesheet.php
    • > /wp-content/plugins/zemanta/mixpanel/examples/custom_consumer.php
    • > /wp-content/plugins/zemanta/views/options-input-text.php
  • 148× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/zemanta/mixpanel/test/ConsumerStrategies/CurlConsumerTest.php:3
    • > [ Base_MixpanelBase - line 126 ]
      added batch back to queue, queue size is now 1
    • > [ Base_MixpanelBase - line 94 ]
      destruct flush attempt #6
    • > [ Base_MixpanelBase - line 94 ]
      destruct flush attempt #1
    • > [ Base_MixpanelBase - line 94 ]
      destruct flush attempt #1
    • > [ Base_MixpanelBase - line 141 ]
      Creating new socket at 1696312920
    • > [ ObConsumer - line 8 ]
      This is the data from a fake error
    • > [ Base_MixpanelBase - line 133 ]
      Batch of 1 consumed, queue size is now 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/zemanta/views/assets.php:17
    • > [ Base_MixpanelBase - line 121 ]
      Batch consumption failed!

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=zemanta
    • > Network (severe)
    http://widgets.twimg.com/j/2/widget.js?_=1696312903243 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Related posts with thumbnails when the post is published), #2 (Widget - Related Images, Related Posts and the powerful search bar), #3 (WordPress admin new post page where Sovrn is suggesting relevant related images and related posts for the post you are writing.), #4 (List of related posts and a neat preview of the post you're about to link to), #5 (The email you receive when another Sovrn user uses your post as a related post)
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

zemanta/zemanta.php Passed 13 tests

"Editorial Assistant by Sovrn" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
100 characters long description:
Contextual suggestions of related posts, images and tags that makes your blogging fun and efficient.

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 detected2,581 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP417311,1732,415
Markdown125085
JSON10026
XML13026
YAML13016
SVG10113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.36
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes28.00%
▷ Concrete classes2392.00%
▷ Final classes00.00%
Methods195
▷ Static methods10.51%
▷ Public methods14574.36%
▷ Protected methods4422.56%
▷ Private methods63.08%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.91MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/menu_icon.png0.74KB0.88KB0.00%
screenshot-1.png92.49KB33.13KB▼ 64.18%
img/logo.png1.89KB1.91KB0.00%
screenshot-4.png312.50KB111.91KB▼ 64.19%
screenshot-5.png89.67KB44.72KB▼ 50.13%