79% ucas

Code Review | UCAS

WordPress plugin UCAS scored 79% from 54 tests.

About plugin

  • Plugin page: ucas
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Mar 7, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: moleisking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 447 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.61ms] Passed 4 tests

Analyzing server-side resources used by UCAS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.68 ▼0.24
Dashboard /wp-admin3.37 ▲0.0647.00 ▲1.21
Posts /wp-admin/edit.php3.48 ▲0.1249.41 ▲2.44
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.41 ▼3.77
Media Library /wp-admin/upload.php3.29 ▲0.0633.20 ▲0.38
Ucas /wp-admin/admin.php?page=ucas-info-page3.2530.88
Configuration /wp-admin/admin.php?page=ucas-configuration-page3.2530.75

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_ucaswidget
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by UCAS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.55 ▼0.821.81 ▲0.1647.13 ▲6.16
Dashboard /wp-admin2,226 ▲495.80 ▲0.7996.00 ▼14.3338.18 ▼8.53
Posts /wp-admin/edit.php2,115 ▲292.03 ▼0.0140.82 ▲6.6132.43 ▼5.24
Add New Post /wp-admin/post-new.php1,558 ▲4423.30 ▲5.67641.12 ▲61.3963.75 ▲4.63
Media Library /wp-admin/upload.php1,405 ▲174.18 ▲0.0196.66 ▲4.3340.99 ▼0.57
Ucas /wp-admin/admin.php?page=ucas-info-page8012.0523.6729.74
Configuration /wp-admin/admin.php?page=ucas-configuration-page8162.0324.5126.36

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: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_ucaswidget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ucas/ucas-widget.php
    • > /wp-content/plugins/ucas/ucas.php
    • > /wp-content/plugins/ucas/ucas-admin.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ucas/ucas-shortcode.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: personal, character, ucas, university, uk...

ucas/ucas.php Passed 13 tests

The primary PHP file in "UCAS" version 1.0.0 is used by WordPress to initiate all plugin functionality
86 characters long description:
A wordpress plugin that counts the characters and lines for a UCAS personal statement.

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
Good job! No executable or dangerous file extensions detected477 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS324238
PHP55641212
Markdown17027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.25
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin