68% yopress

Code Review | YoPress

WordPress plugin YoPress scored68%from 54 tests.

About plugin

  • Plugin page: yopress
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2014
  • Latest release: Nov 11, 2014
  • Number of updates: 6
  • Update frequency: every 22.0 days
  • Top authors: octalmage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.70ms] Passed 4 tests

Server-side resources used by YoPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.81 ▼35.15
Dashboard /wp-admin2.10 ▼1.255.77 ▼50.90
Posts /wp-admin/edit.php2.10 ▼1.266.14 ▼41.99
Add New Post /wp-admin/post-new.php2.10 ▼3.796.91 ▼94.76
Media Library /wp-admin/upload.php2.10 ▼1.134.87 ▼29.85
YoPress /wp-admin/options-general.php?page=yopress/YoPress.php2.106.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for YoPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.161.51 ▼0.4440.60 ▼8.34
Dashboard /wp-admin2,210 ▲224.85 ▼1.03109.87 ▲7.7341.68 ▼0.52
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0638.87 ▼2.8734.94 ▼5.86
Add New Post /wp-admin/post-new.php1,545 ▲3118.33 ▲0.84587.06 ▼72.9850.79 ▼4.64
Media Library /wp-admin/upload.php1,389 ▼24.23 ▲0.0399.40 ▲0.6340.68 ▼3.67
YoPress /wp-admin/options-general.php?page=yopress/YoPress.php8032.0323.5628.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/yopress/YoPress.php+68
    Undefined index: username
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=yopress/YoPress.php
    • > Notice in wp-content/plugins/yopress/YoPress.php+68
    Undefined index: username

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
Please take a closer look at 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/yopress/YoPress.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: api, notifications, yo

yopress/YoPress.php 92% from 13 tests

"YoPress" version 0.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("yopress.php" instead of "YoPress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13615102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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