10% random-app

Code Review | Random App

WordPress plugin Random App scored10%from 54 tests.

About plugin

  • Plugin page: random-app
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Jun 11, 2016
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: vladislavk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /588 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/random-app/includes/widget.php+69
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼53.33ms] Passed 4 tests

A check of server-side resources used by Random App
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.20 ▼32.26
Dashboard /wp-admin2.05 ▼1.305.16 ▼51.19
Posts /wp-admin/edit.php2.05 ▼1.315.83 ▼43.66
Add New Post /wp-admin/post-new.php2.05 ▼3.844.96 ▼86.20
Media Library /wp-admin/upload.php2.05 ▼1.185.08 ▼29.30
All Apps /wp-admin/edit.php?post_type=random_app2.055.23
Add new /wp-admin/post-new.php?post_type=random_app2.055.37

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Random App
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10214.38 ▼0.021.87 ▼0.0540.32 ▼4.03
Dashboard /wp-admin2,229 ▲525.62 ▼0.0891.13 ▲2.9941.18 ▲0.72
Posts /wp-admin/edit.php2,128 ▲282.03 ▲0.0239.91 ▲6.2535.11 ▼3.86
Add New Post /wp-admin/post-new.php1,552 ▲2623.14 ▼0.36642.59 ▼57.7750.80 ▼10.90
Media Library /wp-admin/upload.php1,431 ▲314.21 ▼0.0096.33 ▼2.0441.24 ▼4.53
All Apps /wp-admin/edit.php?post_type=random_app1,1041.9731.4934.20
Add new /wp-admin/post-new.php?post_type=random_app1,7423.6064.3392.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/random-app/includes/widget.php+69
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_random_app_widget
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=random_app
    • > Deprecated in wp-content/plugins/random-app/includes/widget.php+69
    Function create_function() is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=random_app
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in random_app_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/random-app/includes/functions.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/random-app/random-app.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Adding new app in Admin panel:), #2 (Random app is widget:)
  • Plugin Name: You should set the name of your plugin on the first line ( === random-app === )
  • Screenshots: Please add descriptions for these screenshots #0, #0 in random-app/assets to your readme.txt
Please take inspiration from this readme.txt

random-app/random-app.php 85% from 13 tests

The primary PHP file in "Random App" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Good job! No executable or dangerous file extensions detected303 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45453245
CSS110258

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
7 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/play-store.png0.62KB0.68KB0.00%
images/app-store.png0.74KB0.93KB0.00%
images/badge-playmarket.png13.95KB5.58KB▼ 60.01%
images/windows-store.png0.40KB0.50KB0.00%
images/link.png0.79KB0.85KB0.00%