10% wp-show-category-posts

Code Review | wp show category posts

WordPress plugin wp show category posts scored10%from 54 tests.

About plugin

  • Plugin page: wp-show-category-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: May 12, 2015
  • Number of updates: 6
  • Update frequency: every 73.2 days
  • Top authors: ajay3085006 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,484 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-show-category-posts/wp-show-category-posts.php+15
    Use of undefined constant wpscp_nop - assumed 'wpscp_nop' (this will throw an Error in a future version of PHP)

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

A check of server-side resources used by wp show category posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.78 ▲2.69
Dashboard /wp-admin3.32 ▲0.0247.42 ▼6.18
Posts /wp-admin/edit.php3.37 ▲0.0246.23 ▼10.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.88 ▼18.00
Media Library /wp-admin/upload.php3.25 ▲0.0237.92 ▼4.88

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 17 new options
New WordPress options
wpscp_enable
wpscp_title_enable
wpscp_mnop
wpscp_readmore_enable
wpscp_nop
wpscp_date_enable
can_compress_scripts
db_upgraded
wpscp_readmore
wpscp_thumbnail_enable
...

Browser metrics Passed 4 tests

wp show category posts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7113.22 ▼1.341.79 ▲0.0843.82 ▲0.77
Dashboard /wp-admin2,239 ▲335.88 ▼0.03106.46 ▲0.0383.61 ▲40.19
Posts /wp-admin/edit.php2,115 ▲152.01 ▼0.0234.86 ▼5.6634.43 ▼2.22
Add New Post /wp-admin/post-new.php1,539 ▲723.17 ▲0.14774.67 ▲127.9555.12 ▲2.72
Media Library /wp-admin/upload.php1,412 ▲124.30 ▲0.01102.17 ▼11.5871.96 ▲24.37

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

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-show-category-posts/wp-show-category-posts.php:28

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (User view after installation), #2 (Admin setting page)
The official readme.txt might help

wp-show-category-posts/wp-show-category-posts.php Passed 13 tests

Analyzing the main PHP file in "wp show category posts" version 0.1
75 characters long description:
shows any category posts in widget , page or post, have shortcode [wpscp]

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
Good job! No executable or dangerous file extensions detected192 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15519182
CSS10010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png88.32KB40.71KB▼ 53.91%
screenshot-1.png10.45KB5.91KB▼ 43.45%
images/icon.png3.46KB0.64KB▼ 81.51%