84% category-views-by-webline

Code Review | Category Views by Webline

WordPress plugin Category Views by Webline scored84%from 54 tests.

About plugin

  • Plugin page: category-views-by...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2014
  • Latest release: Feb 2, 2023
  • Number of updates: 15
  • Update frequency: every 198.2 days
  • Top authors: WeblineIndia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,306 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.22ms] Passed 4 tests

An overview of server-side resources used by Category Views by Webline
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.04 ▲3.19
Dashboard /wp-admin3.33 ▲0.0346.87 ▼4.10
Posts /wp-admin/edit.php3.38 ▲0.0246.74 ▲1.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.84 ▼14.12
Media Library /wp-admin/upload.php3.25 ▲0.0232.83 ▼3.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
CV_settings
widget_categoryviews
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Category Views by Webline: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.72 ▼0.581.60 ▼0.3339.46 ▼4.80
Dashboard /wp-admin2,206 ▲185.84 ▼0.02104.80 ▼12.1038.47 ▼7.37
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0038.73 ▲0.5434.36 ▲1.05
Add New Post /wp-admin/post-new.php1,514 ▼2117.47 ▼5.67649.89 ▼37.6850.24 ▼4.46
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0693.82 ▼14.1740.45 ▼5.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_categoryviews
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/category-views-by-webline/public/hook.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-views-by-webline/public/category-views.php:2

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)
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: category image, category views, category, category slide, category view...

category-views-by-webline/category-views-by-webline.php Passed 13 tests

This is the main PHP file of "Category Views by Webline" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
123 characters long description:
A Simple plugin allow you to upload category image and have categories displayed in widget using different display options.

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 plugin2,370 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript340651,802
PHP464197462
CSS1150106

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
No PNG images were found in this plugin