84% view-post

Code Review | Post View

WordPress plugin Post View scored84%from 54 tests.

About plugin

  • Plugin page: view-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2022
  • Latest release: Apr 17, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: mahmoodahmed (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short check of server-side resources used by Post View
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0353.78 ▲15.40
Dashboard /wp-admin3.32 ▲0.0142.89 ▼4.65
Posts /wp-admin/edit.php3.37 ▲0.0140.28 ▼5.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.81 ▼15.78
Media Library /wp-admin/upload.php3.24 ▲0.0135.30 ▲3.69

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post View
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12719.03 ▲4.5021.70 ▲20.1142.86 ▲5.58
Dashboard /wp-admin2,195 ▲145.55 ▼0.1482.82 ▼18.8237.96 ▼2.54
Posts /wp-admin/edit.php2,113 ▲131.98 ▲0.0134.29 ▼0.7230.03 ▼4.45
Add New Post /wp-admin/post-new.php1,440 ▼8922.22 ▼0.75576.55 ▼92.5668.91 ▲16.07
Media Library /wp-admin/upload.php1,400 ▲34.21 ▼0.01120.73 ▲23.4648.36 ▲4.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/view-post/view-post.php:12

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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: views, posts, count view, views posts, view

view-post/view-post.php Passed 13 tests

This is the main PHP file of "Post View" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
This plugin is used to find out the number of post views , In addition to a custom column inside the post display table.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin46 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP127740
CSS1106

PHP code Passed 2 tests

A short 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.29
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%
Functions4
▷ Named functions4100.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
There are no PNG files in this plugin