88% most-shared-content

Code Review | Most shared content

WordPress plugin Most shared content scored 88% from 54 tests.

About plugin

  • Plugin page: most-shared-content
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.4
  • WordPress version: 5.8.1
  • First release: Nov 16, 2014
  • Latest release: Nov 19, 2015
  • Number of updates: 6
  • Update frequency: every 61.3 days
  • Top authors: shabbirbhimani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 723 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼142.28ms] Passed 4 tests

Analyzing server-side resources used by Most shared content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0233.49 ▼3.03
Dashboard /wp-admin3.08 ▲0.0245.14 ▼1.39
Posts /wp-admin/edit.php3.14 ▲0.0241.45 ▼2.79
Add New Post /wp-admin/post-new.php5.45 ▲0.0187.99 ▼558.88
Media Library /wp-admin/upload.php3.03 ▲0.0135.12 ▼4.41
Most shared content /wp-admin/options-general.php?page=shared2.9726.46

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Most shared content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10315.86 ▲0.258.93 ▼2.1149.97 ▲1.29
Dashboard /wp-admin3,000 ▲666.09 ▼0.10135.51 ▼9.63113.46 ▼0.40
Posts /wp-admin/edit.php2,757 ▲182.72 ▼0.0064.13 ▲3.8486.96 ▲2.07
Add New Post /wp-admin/post-new.php1,673 ▼1,96319.20 ▲4.24379.33 ▼65.22117.18 ▲7.72
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01146.55 ▼5.33119.26 ▼5.60
Most shared content /wp-admin/options-general.php?page=shared1,0112.0949.3767.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=shared
    • > Notice in wp-content/plugins/most-shared-content/shares.php+88
    Undefined index: regen

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/most-shared-content/shares.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Admin Area) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === most-shared-content === )
You can take inspiration from this readme.txt

most-shared-content/shares.php 92% from 13 tests

The primary PHP file in "Most shared content" version 0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("most-shared-content.php" instead of "shares.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin108 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11521108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
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
Namespaces0
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screenshot1.png37.82KB10.49KB▼ 72.28%