78% randomtips

Code Review | RandomTips

WordPress plugin RandomTips scored 78% from 54 tests.

About plugin

  • Plugin page: randomtips
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 5.8.1
  • First release: Feb 26, 2015
  • Latest release: May 3, 2015
  • Number of updates: 6
  • Update frequency: every 11.5 days
  • Top authors: softcreepers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 743 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by RandomTips
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0447.49 ▲11.03
Dashboard /wp-admin3.10 ▲0.0442.75 ▼16.55
Posts /wp-admin/edit.php3.15 ▲0.0454.99 ▲4.54
Add New Post /wp-admin/post-new.php5.46 ▲0.02112.80 ▼566.33
Media Library /wp-admin/upload.php3.04 ▲0.0435.89 ▼4.25
Random Tips /wp-admin/options-general.php?page=randomtips3.0134.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: 1 new table, no new options
New tables
wp_list_tips

Browser metrics Passed 4 tests

Checking browser requirements for RandomTips
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9316.13 ▲0.4611.76 ▲1.8654.10 ▲5.06
Dashboard /wp-admin2,977 ▲506.54 ▲0.57160.33 ▼32.63116.26 ▲0.61
Posts /wp-admin/edit.php2,749 ▲102.75 ▲0.0477.34 ▼3.0995.16 ▼1.26
Add New Post /wp-admin/post-new.php1,691 ▲9716.06 ▼2.73430.92 ▲25.51112.53 ▼13.48
Media Library /wp-admin/upload.php1,817 ▲105.19 ▲0.16174.86 ▼12.43129.09 ▲1.09
Random Tips /wp-admin/options-general.php?page=randomtips1,3322.7984.3093.90

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
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_list_tips

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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/randomtips/Uninstall.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/randomtips/administration.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/randomtips/Uninstall.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/randomtips/RandomTips.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=randomtips
    • > Network (severe)
    wp-content/plugins/randomtips/images/sort_both.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=randomtips
    • > Network (severe)
    wp-content/plugins/randomtips/images/sort_asc.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: random, tips, shortcode, sentence

randomtips/RandomTips.php 92% from 13 tests

The principal PHP file in "RandomTips" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("randomtips.php" instead of "RandomTips.php")

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 plugin1,146 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS1336437
PO File786111301
PHP55238254
JavaScript103154

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions15
▷ Named functions15100.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
There are no PNG files in this plugin