83% press-this

Code Review | Press This

WordPress plugin Press This scored83%from 54 tests.

About plugin

  • Plugin page: press-this
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Mar 5, 2022
  • Number of updates: 268
  • Update frequency: every 10.7 days
  • Top authors: githubsync (86.57%)kraftbj (5.6%)stephdau (5.22%)Michael Arestad (2.99%)

Code review

54 tests

User reviews

25 reviews

Install metrics

9,000+ active /72,926 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.41ms] Passed 4 tests

Server-side resources used by Press This
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.42 ▼4.96
Dashboard /wp-admin3.33 ▼0.0247.05 ▼11.10
Posts /wp-admin/edit.php3.38 ▲0.0244.86 ▼6.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.13 ▼7.39
Media Library /wp-admin/upload.php3.25 ▲0.0237.15 ▲4.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Press This
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.38 ▼0.151.82 ▲0.3738.61 ▼2.82
Dashboard /wp-admin2,198 ▲245.63 ▲0.0480.28 ▼8.5038.72 ▼4.75
Posts /wp-admin/edit.php2,100 ▼42.00 ▲0.0133.35 ▼3.6335.81 ▲5.59
Add New Post /wp-admin/post-new.php1,526 ▼023.00 ▼0.11681.93 ▼7.4352.22 ▼24.87
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.04104.51 ▲7.5346.58 ▼1.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/press-this/press-this-plugin.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in press-this/assets to your readme.txt
The official readme.txt is a good inspiration

press-this/press-this-plugin.php 85% from 13 tests

The entry point to "Press This" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("press-this.php" instead of "press-this-plugin.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin5,566 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS46971803,739
PHP22504181,057
JavaScript3195110751
JSON10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity227.00
▷ Minimum class complexity227.00
▷ Maximum class complexity227.00
Average method complexity10.04
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin