78% resultpress

Code Review | ResultPress

WordPress plugin ResultPress scored78%from 54 tests.

About plugin

  • Plugin page: resultpress
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Jun 18, 2016
  • Number of updates: 12
  • Update frequency: every 2.1 days
  • Top authors: raselahmed7 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▼3.74ms] Passed 4 tests

An overview of server-side resources used by ResultPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.5448.94 ▲2.87
Dashboard /wp-admin4.23 ▲0.6059.10 ▼11.68
Posts /wp-admin/edit.php4.25 ▲0.5759.42 ▲2.73
Add New Post /wp-admin/post-new.php6.82 ▲0.68103.40 ▼8.89
Media Library /wp-admin/upload.php4.15 ▲0.6641.79 ▲4.55
Add New /wp-admin/post-new.php?post_type=rrf-result4.5960.33
ResultPress Settings /wp-admin/edit.php?post_type=rrf-result&page=resultpress-settings4.1239.24
Results /wp-admin/edit.php?post_type=rrf-result4.2043.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ResultPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.48 ▲0.132.24 ▲0.4543.60 ▲1.52
Dashboard /wp-admin2,240 ▲605.71 ▲0.0691.47 ▲2.1044.07 ▼0.67
Posts /wp-admin/edit.php2,142 ▲422.07 ▲0.0643.41 ▲6.5336.13 ▲0.23
Add New Post /wp-admin/post-new.php1,559 ▲2823.46 ▲0.23690.66 ▼17.1469.72 ▲17.36
Media Library /wp-admin/upload.php1,442 ▲484.24 ▼0.02104.24 ▼6.0042.15 ▼2.83
Add New /wp-admin/post-new.php?post_type=rrf-result2,0452.7470.9771.71
ResultPress Settings /wp-admin/edit.php?post_type=rrf-result&page=resultpress-settings1,7762.6342.6840.19
Results /wp-admin/edit.php?post_type=rrf-result1,1221.9933.3931.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/resultpress/libs/recaptcha/human-verify.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/resultpress/admin/resultpress-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resultpress/admin/resultpress-metabox.php:6
    • > PHP Notice
      Undefined variable: private in wp-content/plugins/resultpress/libs/recaptcha/human-verify.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resultpress/admin/resultpress-cpt.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/resultpress/templates/marksheet-theme-1.php:1
    • > PHP Warning
      Use of undefined constant success - assumed 'success' (this will throw an Error in a future version of PHP) in wp-content/plugins/resultpress/libs/recaptcha/human-verify.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resultpress/resultpress.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resultpress/libs/cmb2/init.php:77
    • > PHP Notice
      Undefined variable: captcha in wp-content/plugins/resultpress/libs/recaptcha/human-verify.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === resultpress === )
You can take inspiration from this readme.txt

resultpress/resultpress.php Passed 13 tests

The main PHP script in "ResultPress" version 1.1 is automatically included on every request by WordPress
57 characters long description:
This plugin student result system in your wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin15,698 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS122,0642,0729,036
PHP201,1622,1764,181
Sass11168231,116
JavaScript7202194805
PO File2243274548
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity43.57
▷ Minimum class complexity3.00
▷ Maximum class complexity130.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods228
▷ Static methods2310.09%
▷ Public methods21594.30%
▷ Protected methods93.95%
▷ Private methods41.75%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
libs/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
libs/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
libs/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
libs/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%