72% latest-news-posts

Code Review | Latest News, Posts, Articles

WordPress plugin Latest News, Posts, Articles scored72%from 54 tests.

About plugin

  • Plugin page: latest-news-posts
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2023
  • Latest release: Mar 11, 2023
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: ferdausalom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.39MB] [CPU: ▲6.03ms] Passed 4 tests

Analyzing server-side resources used by Latest News, Posts, Articles
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.86 ▲1.4045.33 ▲2.77
Dashboard /wp-admin4.71 ▲1.3759.14 ▼2.29
Posts /wp-admin/edit.php4.76 ▲1.4059.94 ▲13.48
Add New Post /wp-admin/post-new.php7.31 ▲1.42103.79 ▲15.02
Media Library /wp-admin/upload.php4.61 ▲1.3844.10 ▲10.16

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 563 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Latest News, Posts, Articles
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,067 ▲32115.01 ▲0.644.86 ▲3.1937.80 ▼6.52
Dashboard /wp-admin2,395 ▲2076.56 ▲0.70135.26 ▲31.4241.26 ▼6.33
Posts /wp-admin/edit.php2,301 ▲2153.50 ▲1.4846.32 ▲11.1529.25 ▼6.57
Add New Post /wp-admin/post-new.php1,409 ▼12418.91 ▼4.08491.01 ▼181.1228.24 ▼26.25
Media Library /wp-admin/upload.php1,437 ▲524.30 ▲0.1183.28 ▼15.7741.64 ▼1.45
LNPA Settings /wp-admin/crb_carbon_fields_container_lnpa_settings.php260.440.1113.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 227× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Datastore/Theme_Options_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/latest-news-posts/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Equality_Comparer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Container/Term_Meta_Container.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Holder_Interface' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Field/Field.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/core/Field/Textarea_Field.php:8
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/latest-news-posts/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/latest-news-posts/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_lnpa_settings.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_lnpa_settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: latest posts, latest articles, blog, from blog, latest news

latest-news-posts/latest-news.php 85% from 13 tests

The entry point to "Latest News, Posts, Articles" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("latest-news-posts.php" instead of "latest-news.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected23,676 lines of code in 510 files:
LanguageFilesBlank linesComment linesLines of code
PHP2623,0147,46811,399
JavaScript1571,3752,9776,901
PO File288981,1112,411
Sass4835701,826
JSON500715
CSS3107232
YAML3313123
Markdown324068
SVG1001

PHP code Passed 2 tests

This is a very shot 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.28
Average class complexity5.55
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces26
Interfaces5
Traits0
Classes233
▷ Abstract classes125.15%
▷ Concrete classes22194.85%
▷ Final classes20.90%
Methods1,031
▷ Static methods10610.28%
▷ Public methods81979.44%
▷ Protected methods19919.30%
▷ Private methods131.26%
Functions113
▷ Named functions2421.24%
▷ Anonymous functions8978.76%
Constants37
▷ Global constants821.62%
▷ Class constants2978.38%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin