79% encrypted-post-type

Code Review | Encrypted Post Type

WordPress plugin Encrypted Post Type scored79%from 54 tests.

About plugin

  • Plugin page: encrypted-post-type
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Oct 5, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: NewJenk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.09MB] [CPU: ▼15.63ms] Passed 4 tests

A check of server-side resources used by Encrypted Post Type
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0938.62 ▼0.26
Dashboard /wp-admin3.25 ▼0.0529.73 ▼18.09
Posts /wp-admin/edit.php3.31 ▼0.0431.97 ▼16.15
Add New Post /wp-admin/post-new.php5.61 ▼0.2772.33 ▼22.99
Media Library /wp-admin/upload.php3.25 ▲0.0228.30 ▼5.29
Add New /wp-admin/post-new.php?post_type=en_p_t5.6171.10
Manage Tags /wp-admin/edit-tags.php?taxonomy=en_p_t_tag&post_type=en_p_t3.2329.95
All Notes /wp-admin/edit.php?post_type=en_p_t3.3029.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
en_p_t_ek_e
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Encrypted Post Type
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.22 ▼1.161.76 ▲0.0843.62 ▲4.19
Dashboard /wp-admin2,242 ▲565.91 ▲0.9697.57 ▼11.8042.12 ▲0.41
Posts /wp-admin/edit.php2,124 ▲352.02 ▲0.0135.62 ▼4.4935.84 ▼1.69
Add New Post /wp-admin/post-new.php1,542 ▲823.34 ▲0.05661.59 ▲81.6346.15 ▼7.84
Media Library /wp-admin/upload.php1,417 ▲354.21 ▲0.0198.09 ▼3.3344.68 ▲0.59
Add New /wp-admin/post-new.php?post_type=en_p_t1,50616.92861.5733.16
Manage Tags /wp-admin/edit-tags.php?taxonomy=en_p_t_tag&post_type=en_p_t1,2702.1430.2630.74
All Notes /wp-admin/edit.php?post_type=en_p_t1,6962.0533.9231.61

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=en_p_t
    • > Notice in wp-content/plugins/encrypted-post-type/inc/classes/class-register-post-type.php+235
    Undefined variable: parent_file

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/encrypted-post-type/inc/classes/class-rest-posts-controller.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: security, privacy, encryption

encrypted-post-type/encrypted-post-type.php Passed 13 tests

The main PHP file in "Encrypted Post Type" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
92 characters long description:
Encrypted Post Type provides a custom post type where the content of each post is encrypted.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected640 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4481425572
CSS1113947
JavaScript1182621

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected