10% categorized-new-post

Code Review | Categorized New Post

WordPress plugin Categorized New Post scored10%from 54 tests.

About plugin

  • Plugin page: categorized-new-post
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2016
  • Latest release: Oct 19, 2016
  • Number of updates: 6
  • Update frequency: every 15.2 days
  • Top authors: boomil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /913 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/categorized-new-post/categorized-new-post.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; MyCategorizedNewPostWidget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.70ms] Passed 4 tests

A check of server-side resources used by Categorized New Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.32 ▼41.67
Dashboard /wp-admin2.09 ▼1.217.56 ▼46.80
Posts /wp-admin/edit.php2.09 ▼1.267.16 ▼43.90
Add New Post /wp-admin/post-new.php2.09 ▼3.795.16 ▼94.44
Media Library /wp-admin/upload.php2.09 ▼1.147.22 ▼24.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_mycategorizednewpostwidget
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Categorized New Post: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.011.84 ▼0.5238.39 ▼3.87
Dashboard /wp-admin2,198 ▲215.62 ▲0.03100.89 ▲9.9646.78 ▲6.59
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0536.97 ▼2.2336.49 ▼0.63
Add New Post /wp-admin/post-new.php1,526 ▼023.74 ▲0.79684.23 ▼14.3750.49 ▼1.72
Media Library /wp-admin/upload.php1,394 ▼64.21 ▼0.0994.25 ▼15.3340.75 ▼5.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/categorized-new-post/categorized-new-post.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; MyCategorizedNewPostWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_mycategorizednewpostwidget
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/categorized-new-post/categorized-new-post.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Screenshots: Screenshot #1 (Displayed widget.) image missing
The official readme.txt is a good inspiration

categorized-new-post/categorized-new-post.php Passed 13 tests

The entry point to "Categorized New Post" version 1.0.3 is a PHP file that has certain tags in its header comment area
32 characters long description:
Widget for categorized new post.

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
No dangerous file extensions were detected72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131372

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png113.32KB35.64KB▼ 68.55%