84% thinkalink-yeardata

Code Review | Thinkalink YearData

WordPress plugin Thinkalink YearData scored84%from 54 tests.

About plugin

  • Plugin page: thinkalink-yeardata
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Aug 30, 2021
  • Latest release: Aug 31, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: thinkalink (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /266 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.00MB] [CPU: ▼3.22ms] Passed 4 tests

Server-side resources used by Thinkalink YearData
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.19 ▲1.06
Dashboard /wp-admin3.31 ▲0.0042.99 ▼6.91
Posts /wp-admin/edit.php3.36 ▲0.0048.84 ▼0.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.63 ▼6.79
Media Library /wp-admin/upload.php3.23 ▲0.0035.64 ▲2.24

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Thinkalink YearData
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.271.91 ▼0.1546.83 ▲2.03
Dashboard /wp-admin2,206 ▲214.85 ▼1.00107.63 ▲4.3642.11 ▼2.41
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0339.62 ▲2.8736.00 ▲2.49
Add New Post /wp-admin/post-new.php1,514 ▼517.50 ▼5.69697.83 ▼18.9752.26 ▼6.63
Media Library /wp-admin/upload.php1,382 ▼64.17 ▼0.0397.94 ▼4.8141.13 ▼3.75

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/thinkalink-yeardata/thinkalink-yeardata.php:29

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 issues were found

Optimizations

Plugin configuration Passed 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: thinkalink year data, year data, yeardata, thinkalink yeardata, thinkalink...

thinkalink-yeardata/thinkalink-yeardata.php Passed 13 tests

The main PHP script in "Thinkalink YearData" version 1.0.1 is automatically included on every request by WordPress
99 characters long description:
Thinkalink YearData allows you to use the [thinkalink_yeardata] shortcode to show the current year.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13206

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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