83% cryptofavorite-informer

Code Review | Cryptofavorite Cryptocurrency Widgets

WordPress plugin Cryptofavorite Cryptocurrency Widgets scored83%from 54 tests.

About plugin

  • Plugin page: cryptofavorite-in...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Mar 24, 2018
  • Latest release: May 10, 2018
  • Number of updates: 14
  • Update frequency: every 3.6 days
  • Top authors: cryptofavorite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.04ms] Passed 4 tests

Analyzing server-side resources used by Cryptofavorite Cryptocurrency Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.78 ▲2.55
Dashboard /wp-admin3.31 ▲0.0145.71 ▼1.16
Posts /wp-admin/edit.php3.37 ▲0.0143.52 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.66 ▼18.13
Media Library /wp-admin/upload.php3.24 ▲0.0133.42 ▲1.38

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cryptofavorite Cryptocurrency Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲12713.70 ▼0.908.61 ▲6.7344.45 ▲5.93
Dashboard /wp-admin2,208 ▲285.62 ▲0.1088.07 ▼3.7440.74 ▼3.25
Posts /wp-admin/edit.php2,116 ▲161.99 ▼0.1032.76 ▼7.6234.64 ▼3.82
Add New Post /wp-admin/post-new.php1,542 ▲1622.87 ▼0.18632.10 ▲34.9249.71 ▲2.68
Media Library /wp-admin/upload.php1,419 ▲254.25 ▲0.0493.32 ▼5.6242.05 ▼1.80

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cryptofavorite-informer/includes/settings-page.php:69

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: No tags were detected
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

cryptofavorite-informer/cryptofavorite-plugin.php 85% from 13 tests

"Cryptofavorite Cryptocurrency Widgets" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cryptofavorite-informer.php" instead of "cryptofavorite-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin528 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23364187
JavaScript12424118
Sass1173113
CSS1160110

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 are no PNG files in this plugin