84% neykane-viral-list-posts

Code Review | Neykane Viral List Posts

WordPress plugin Neykane Viral List Posts scored84%from 54 tests.

About plugin

  • Plugin page: neykane-viral-lis...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: May 24, 2019
  • Latest release: Sep 23, 2021
  • Number of updates: 9
  • Update frequency: every 94.8 days
  • Top authors: neykane (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /767 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼4.73ms] Passed 4 tests

An overview of server-side resources used by Neykane Viral List Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2243.54 ▲3.77
Dashboard /wp-admin3.52 ▲0.2156.90 ▲8.14
Posts /wp-admin/edit.php3.64 ▲0.2851.58 ▼4.20
Add New Post /wp-admin/post-new.php6.21 ▲0.3188.12 ▼17.14
Media Library /wp-admin/upload.php3.44 ▲0.2136.88 ▼1.35
Add New /wp-admin/post-new.php?post_type=list_posts3.6858.22
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=list_posts3.4441.62
All List Posts /wp-admin/edit.php?post_type=list_posts3.5041.42
Settings /wp-admin/edit.php?post_type=list_posts&page=settings3.4233.15
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=list_posts3.4437.25

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

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

Browser metrics Passed 4 tests

Neykane Viral List Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.24 ▼0.111.86 ▲0.2543.54 ▼1.62
Dashboard /wp-admin2,234 ▲545.54 ▼0.1283.86 ▼14.0339.94 ▼4.43
Posts /wp-admin/edit.php2,139 ▲392.03 ▲0.0236.46 ▼3.9535.31 ▲4.50
Add New Post /wp-admin/post-new.php1,558 ▲3023.49 ▲0.26685.72 ▼23.7056.90 ▼5.99
Media Library /wp-admin/upload.php1,439 ▲394.20 ▲0.06102.08 ▼3.0644.12 ▼1.92
Add New /wp-admin/post-new.php?post_type=list_posts3,1339.47200.97153.35
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=list_posts1,4942.2429.6434.07
All List Posts /wp-admin/edit.php?post_type=list_posts1,1892.5742.9631.22
Settings /wp-admin/edit.php?post_type=list_posts&page=settings8332.0323.9526.69
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=list_posts1,3582.1231.5431.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • category_children
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/neykane-viral-list-posts/admin/partials/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neykane-viral-list-posts/public/partials/standard_1.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neykane-viral-list-posts/public/partials/standard_2.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
6 plugin tags: post, listicle, viral, neykane, list...

neykane-viral-list-posts/neykane-viral-list-posts.php Passed 13 tests

The primary PHP file in "Neykane Viral List Posts" version 1.1.1 is used by WordPress to initiate all plugin functionality
119 characters long description:
Adds a new "List Posts" Custom Post Type to help you create memorable, well-organized, and highly-shareable list posts.

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
Good job! No executable or dangerous file extensions detected1,619 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP141925391,134
JavaScript41353407
CSS4161078

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.29
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods36.25%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/item_placeholder.png11.53KB6.27KB▼ 45.57%