84% news-blog-classifier

Code Review | News Blog Classifier

WordPress plugin News Blog Classifier scored84%from 54 tests.

About plugin

  • Plugin page: news-blog-classifier
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Apr 4, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: irmayunita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼5.25ms] Passed 4 tests

Server-side resources used by News Blog Classifier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.29 ▲4.07
Dashboard /wp-admin3.33 ▲0.0352.29 ▼1.60
Posts /wp-admin/edit.php3.39 ▲0.0349.40 ▼0.41
Add New Post /wp-admin/post-new.php5.47 ▼0.4175.49 ▼17.78
Media Library /wp-admin/upload.php3.25 ▲0.0236.58 ▼1.21

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: 8 new tables, 7 new options
New tables
wp_nbc_word_lists
wp_nbc_stopword_lists
wp_nbc_categories
wp_nbc_words
wp_nbc_document_collections
wp_nbc_root_words
wp_nbc_word_details
wp_nbc_word_types
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
category_children
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by News Blog Classifier
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.34 ▼1.014.39 ▲2.4942.35 ▲1.60
Dashboard /wp-admin2,221 ▲215.80 ▼0.0799.52 ▼19.3838.21 ▼21.43
Posts /wp-admin/edit.php2,172 ▲692.04 ▼0.1033.68 ▼2.0634.44 ▼0.37
Add New Post /wp-admin/post-new.php6,255 ▲4,71521.95 ▲3.65882.46 ▲258.9964.11 ▲17.29
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.04101.38 ▼1.8644.22 ▲1.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • category_children
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/news-blog-classifier/news-blog-classifier.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: news blog, text classification, detik

news-blog-classifier/news-blog-classifier.php Passed 13 tests

Analyzing the main PHP file in "News Blog Classifier" version 1.0.0
97 characters long description:
This plugin is used to classify content blog to category: Health, Technology, Economy, and Sports

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin56,603 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SQL16114555,999
PHP3143109509
JavaScript114270
CSS24525

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%