83% topcontent

Code Review | Topcontent

WordPress plugin Topcontent scored83%from 54 tests.

About plugin

  • Plugin page: topcontent
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 26
  • Update frequency: every 47.7 days
  • Top authors: topcontent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,111 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.98ms] Passed 4 tests

Server-side resources used by Topcontent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1242.37 ▲1.29
Dashboard /wp-admin3.43 ▲0.1346.16 ▼3.59
Posts /wp-admin/edit.php3.55 ▲0.1946.39 ▼0.56
Add New Post /wp-admin/post-new.php6.03 ▲0.1483.36 ▼11.17
Media Library /wp-admin/upload.php3.36 ▲0.1233.77 ▼0.61

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/topcontent/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/topcontent/assets/libs/\321\201lass.custom.html.handler.php"
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Topcontent: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.22 ▼0.121.80 ▲0.0541.58 ▼2.01
Dashboard /wp-admin2,208 ▲315.59 ▼0.0691.87 ▼10.6039.44 ▼7.59
Posts /wp-admin/edit.php2,119 ▲162.04 ▲0.0437.54 ▼6.7434.46 ▼2.95
Add New Post /wp-admin/post-new.php1,540 ▲1122.77 ▼0.71665.20 ▲8.7758.86 ▲8.26
Media Library /wp-admin/upload.php1,416 ▲164.22 ▼0.0496.35 ▼0.0241.07 ▼2.00

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/topcontent/assets/libs/class.topcontent.php
    • > /wp-content/plugins/topcontent/topcontent.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

topcontent/topcontent.php 92% from 13 tests

The principal PHP file in "Topcontent" v. 1.2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 210 characters long)

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
Good job! No executable or dangerous file extensions detected923 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP415565704
CSS2258150
JavaScript118869

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity17.67
▷ Minimum class complexity7.00
▷ Maximum class complexity32.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods746.67%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions16
▷ Named functions1062.50%
▷ Anonymous functions637.50%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/topcont_logo.png5.39KB3.60KB▼ 33.32%