78% runpress

Code Review | RunPress

WordPress plugin RunPress scored78%from 54 tests.

About plugin

  • Plugin page: runpress
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.7
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: Feb 12, 2017
  • Number of updates: 19
  • Update frequency: every 33.3 days
  • Top authors: markusfrenzel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.13ms] Passed 4 tests

An overview of server-side resources used by RunPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.85 ▼4.45
Dashboard /wp-admin3.34 ▲0.0450.94 ▲2.87
Posts /wp-admin/edit.php3.39 ▲0.0351.74 ▼0.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.45 ▼19.00
Media Library /wp-admin/upload.php3.26 ▲0.0338.54 ▼0.89
RunPress /wp-admin/admin.php?page=runpress3.2539.22
Shortcode Generator /wp-admin/admin.php?page=runpress-shortcode-generator3.2537.38
Local DB /wp-admin/admin.php?page=runpress-local-db3.2537.43
Donate! /wp-admin/admin.php?page=runpress-donate3.2536.74
Donations Leaderbord /wp-admin/admin.php?page=runpress-donations-leaderboard3.2334.38
Sync /wp-admin/admin.php?page=runpress-sync3.2538.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 82 new files
Database: 1 new table, 8 new options
New tables
wp_runpress_db
New WordPress options
runpress_option_db_version
widget_runpress_widget
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

RunPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15614.44 ▲0.164.97 ▲2.7939.07 ▲1.06
Dashboard /wp-admin2,297 ▲1205.68 ▲0.0388.91 ▼25.9441.13 ▼14.48
Posts /wp-admin/edit.php2,156 ▲532.05 ▲0.0641.35 ▲4.4838.06 ▲1.41
Add New Post /wp-admin/post-new.php1,565 ▲3923.69 ▲0.62623.26 ▼68.0658.97 ▲3.96
Media Library /wp-admin/upload.php1,455 ▲584.19 ▲0.0199.64 ▼1.9142.46 ▼0.49
RunPress /wp-admin/admin.php?page=runpress1,1102.0223.9233.33
Shortcode Generator /wp-admin/admin.php?page=runpress-shortcode-generator1,4351.7728.7744.39
Local DB /wp-admin/admin.php?page=runpress-local-db1,1822.4845.7037.20
Donate! /wp-admin/admin.php?page=runpress-donate1,0032.0925.9427.33
Donations Leaderbord /wp-admin/admin.php?page=runpress-donations-leaderboard9442.0023.0027.73
Sync /wp-admin/admin.php?page=runpress-sync1,0552.0628.8230.16

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_runpress_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • runpress_option_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/runpress/runpress.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      imagejpeg() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 21
    • > PHP Notice
      Undefined index: text in wp-content/plugins/runpress/inc/img/showjpg.php on line 3
    • > PHP Warning
      imagesx() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 11
    • > PHP Warning
      imagecreatefromjpeg(): Filename cannot be empty in wp-content/plugins/runpress/inc/img/showjpg.php on line 4
    • > PHP Notice
      Undefined index: image in wp-content/plugins/runpress/inc/img/showjpg.php on line 2
    • > PHP Warning
      imagedestroy() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 22
    • > PHP Warning
      imagecolorallocate() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/runpress/inc/widget/runpress-widget.php:43
    • > PHP Warning
      imagesy() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 12
    • > PHP Warning
      imagestring() expects parameter 1 to be resource, bool given in wp-content/plugins/runpress/inc/img/showjpg.php on line 18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #7 (Single activity in a post/page) image missing
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can look at the official readme.txt

runpress/runpress.php 92% from 13 tests

Analyzing the main PHP file in "RunPress" version 1.4.2
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin10,578 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,9857,0146,498
PHP52467192,327
CSS530791,100
PO File1203214597
JSON30056

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity32.00
▷ Minimum class complexity11.00
▷ Maximum class complexity54.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods2882.35%
▷ Protected methods38.82%
▷ Private methods38.82%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.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
27 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/flags/Denmark.png36.00KB16.99KB▼ 52.81%
inc/images/sort_asc.png1.09KB0.25KB▼ 77.46%
inc/img/flags/Germany.png43.48KB16.25KB▼ 62.64%
inc/img/red_hook.png28.81KB10.14KB▼ 64.80%
inc/img/glass_numbers/glass_numbers_4.png3.44KB2.52KB▼ 26.71%