90% stock-market-infographics-by-simply-wall-st

Code Review | Stock Market Infographics by Simply Wall St

WordPress plugin Stock Market Infographics by Simply Wall St scored90%from 54 tests.

About plugin

  • Plugin page: stock-market-info...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2016
  • Latest release: Sep 28, 2016
  • Number of updates: 19
  • Update frequency: every 2.1 days
  • Top authors: simplywallst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Stock Market Infographics by Simply Wall St
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.44 ▼6.36
Dashboard /wp-admin3.31 ▲0.0151.98 ▼3.79
Posts /wp-admin/edit.php3.37 ▲0.0146.17 ▼3.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.22 ▼0.62
Media Library /wp-admin/upload.php3.24 ▲0.0138.24 ▲0.35
Simply Wall Street /wp-admin/options-general.php?page=sws_settings3.2033.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Stock Market Infographics by Simply Wall St
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.73 ▲0.131.75 ▼0.1146.64 ▲4.88
Dashboard /wp-admin2,196 ▲165.50 ▼0.1681.25 ▼10.3237.29 ▼2.53
Posts /wp-admin/edit.php2,107 ▲72.02 ▼0.0033.92 ▼7.5132.32 ▼3.55
Add New Post /wp-admin/post-new.php1,542 ▲1218.39 ▼4.70613.81 ▼48.5675.82 ▲14.42
Media Library /wp-admin/upload.php1,408 ▲144.45 ▲0.25104.69 ▲5.9648.35 ▲7.99
Simply Wall Street /wp-admin/options-general.php?page=sws_settings7932.0024.1726.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues 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
6 plugin tags: stock market, simply wall st, affiliate, infographic, finance...

stock-market-infographics-by-simply-wall-st/simplywallst.php 92% from 13 tests

The entry point to "Stock Market Infographics by Simply Wall St" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("stock-market-infographics-by-simply-wall-st.php" instead of "simplywallst.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 plugin686 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS13648380
PHP24225293
JavaScript12013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.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%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/favicon-16x16.png1.30KB0.88KB▼ 32.48%