84% shortest-website-monetization

Code Review | Shorte.st Monetization

WordPress plugin Shorte.st Monetization scored84%from 54 tests.

About plugin

  • Plugin page: shortest-website-...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2013
  • Latest release: Jan 22, 2019
  • Number of updates: 61
  • Update frequency: every 31.2 days
  • Top authors: shortest_team (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /75,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.17ms] Passed 4 tests

Server-side resources used by Shorte.st Monetization
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.27 ▲0.19
Dashboard /wp-admin3.34 ▲0.0349.92 ▼0.95
Posts /wp-admin/edit.php3.39 ▲0.0351.80 ▲4.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.00 ▼10.61
Media Library /wp-admin/upload.php3.26 ▲0.0336.41 ▼1.29
Monetize your website /wp-admin/options-general.php?page=shortest-website-monetization3.3134.57

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 26 new options
New WordPress options
shst_token
widget_recent-posts
shst_es_type
shst_fps_capping_limit
shst_pop_enabled
shst_exs_enabled
shst_fps_capping_enabled
shst_fps_selection_type
shst_op_default_set
shst_email_changed
...

Browser metrics Passed 4 tests

Shorte.st Monetization: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.48 ▼0.887.74 ▲6.0540.37 ▼2.81
Dashboard /wp-admin2,199 ▲225.52 ▼0.0688.33 ▼4.4640.75 ▼1.82
Posts /wp-admin/edit.php2,101 ▼21.99 ▼0.0138.93 ▲2.6236.37 ▲2.45
Add New Post /wp-admin/post-new.php1,529 ▲322.96 ▼0.01708.47 ▲17.2958.53 ▲1.95
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.02107.59 ▼1.6847.72 ▲0.84
Monetize your website /wp-admin/options-general.php?page=shortest-website-monetization1,1172.0228.7669.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • shst_api_ready
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Shortest_Monetization' not found in wp-content/plugins/shortest-website-monetization/views/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Shortest_Monetization' not found in wp-content/plugins/shortest-website-monetization/views/public.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: monetization, traffic

shortest-website-monetization/shortest-website-monetization.php 92% from 13 tests

Analyzing the main PHP file in "Shorte.st Monetization" version 1.2.0
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin922 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7117295510
CSS2393289
JavaScript217167
SVG10156

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1144.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/slider.png0.96KB0.10KB▼ 89.64%
assets/slider_right.png0.91KB0.08KB▼ 91.00%
assets/ninjahead.png2.20KB1.25KB▼ 42.98%
assets/switch-round.png1.73KB0.63KB▼ 63.81%
assets/off.png0.98KB0.10KB▼ 90.07%