89% cc-list-posts

Code Review | CC-List-Posts

WordPress plugin CC-List-Posts scored89%from 54 tests.

About plugin

  • Plugin page: cc-list-posts
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Mar 16, 2022
  • Number of updates: 3
  • Update frequency: every 636.3 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.30ms] Passed 4 tests

An overview of server-side resources used by CC-List-Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.19 ▲1.25
Dashboard /wp-admin3.34 ▲0.0452.27 ▲1.85
Posts /wp-admin/edit.php3.45 ▲0.1056.28 ▲2.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.82 ▼12.47
Media Library /wp-admin/upload.php3.26 ▲0.0433.35 ▼3.82

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CC-List-Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.43 ▲0.121.85 ▼0.1147.22 ▲6.98
Dashboard /wp-admin2,206 ▲184.85 ▲0.01113.11 ▼4.9945.36 ▼4.51
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0543.82 ▲1.1438.33 ▲0.58
Add New Post /wp-admin/post-new.php1,538 ▲2423.19 ▲5.47697.55 ▼34.9065.97 ▼0.34
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.03109.32 ▼13.7348.73 ▼8.31

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (**CC-List-Posts Shortcode** - Visit the 'Post/Page Editor' and add [wp_list_posts] shortcode.)
The official readme.txt is a good inspiration

cc-list-posts/plugin.php 85% from 13 tests

The principal PHP file in "CC-List-Posts" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cc-list-posts.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin165 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45874165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity15.50
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods14
▷ Static methods535.71%
▷ Public methods964.29%
▷ Protected methods535.71%
▷ 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png71.94KB27.69KB▼ 61.51%